Trouble running demo

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Guest

Trouble running demo

Post by Guest » Fri Mar 28, 2003 2:23 am

I was about to post a question on why I got this message:

java.lang.NoClassDefFoundError: com/jrefinery/ui/Drawable
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:250)
at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
at com.jrefinery.chart.ChartFactory.createPieChart(Unknown Source)
at Graph.main(Graph.java:28)
Exception in thread "main" Process terminated with exit code 1

It seemed to be missing some libraries and I was sure I had set the paths correctly. I had read that the main jar finds the jcommon but I tried adding it as an extra class path... and then everything worked. Am I the stupid one, or is something fishy?

Taqua
JFreeReport Project Leader
Posts: 698
Joined: Fri Mar 14, 2003 3:34 pm
Contact:

Post by Taqua » Fri Mar 28, 2003 6:22 am

Hi,

the classpath definition inside the main jar file is only evaluated when starting the demo with

java - jar <jar-file>

On any other use, the jar's classpath will not be used and you'll have to set up an own.

Have more fun,
said Thomas

Bengt Baron

thanks

Post by Bengt Baron » Tue Apr 01, 2003 10:31 am

Hi again and thanks for the reply. Sorry for not replying sooner (I want to keep good forum manners...), but thanks again!

Locked