So I have a program that is using Joda-Time that works perfectly fine when run through Eclipse. However when I export it as a .jar, the program doesn't run at all. When I ran the program through command prompt, I got the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/joda/time/DateTime
at BouncyBallSource.BouncyBallV5.<init>(BouncyBallV5.java:131)
at BBDriver.main(BBDriver.java:17)
Caused by: java.lang.ClassNotFoundException: org.joda.time.DateTime
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 2 more
I added the Joda-Time jar to the Build Path, and I get no errors in Eclipse. I have no clue why this is happening, so how do I go about fixing it, and is anyone else having this problem?
By the way, line 131 is: DateTime dt = new DateTime();
Command: java -jar BouncyBallV5.0.0A2.jar