anonymous
2014-01-13 09:37:52 UTC
My program was working but today I've decided to add JFreeChart and JCommon to my library and I've set up a button which when clicked displays a bar chart. The problem is when I clean and build the project everything goes smoothly and then when I click the generated .jar file in my netbeans project directory it all shows up fine, but however if I move the .jar file from netbeans directory to my desktop, i get the error 'A java exception has occurred'. I've also tried to run it through CMD and it displays the following:
Exception in thread "main" java.lang.NoClassDefFoundError: org/jfree/data/category/CategoryDataset
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at sun.launcher.LauncherHelper.getMainMethod(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.jfree.data.category.CategoryDataset
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
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)
... 6 more
Can anyone help me out?
Thanks