demo compilation problems

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

demo compilation problems

Post by Raj » Mon Aug 12, 2002 5:02 pm

While trying to run any of the demo like XYSeriesDemo.java or LineChartDemo1.java i get the following error

Exception in thread "main" java.lang.NoClassDefFoundError:

The classes compile ok, so I presume that I have set up the classpaths properly.

Can anyone help?

Thanks
Raj

David Gilbert

Re: demo compilation problems

Post by David Gilbert » Mon Aug 12, 2002 5:05 pm

A couple of things might be happening, it's hard to say without seeing more of the exception:

1) You might not have compiled the class files for the resource bundles. There is a note about this in the installation guide.

2) Are you running on Linux/Unix without X11 running? There is a post elsewhere in the forum with workarounds for this problem. Search for 'X11'...

Regards,

DG.

Raj

Re: demo compilation problems

Post by Raj » Mon Aug 12, 2002 5:20 pm

I have set my Classpath to the
jcommon-0.6.4.jar
and jfreechart-0.9.2jar
do I still need to recompiles the classes?

David Gilbert

Re: demo compilation problems

Post by David Gilbert » Mon Aug 12, 2002 5:22 pm

No, I assumed you were recompiling the classes yourself. Everything is precompiled in the jar files, but you need to include jfreechart-0.9.2-demo.jar as well as the two you mentioned.

Regards,

Dave Gilbert

Raj

Re: demo compilation problems

Post by Raj » Mon Aug 12, 2002 5:34 pm

Have added the extra jar file. The problem still persisits.

Raj

David Gilbert

Re: demo compilation problems

Post by David Gilbert » Mon Aug 12, 2002 5:36 pm

Post the full exception message, and I will take a look.

Regards,

DG.

Raj

Re: demo compilation problems

Post by Raj » Mon Aug 12, 2002 5:38 pm

Exception in thread "main" java.lang.NoClassDefFoundError: name of class


Thats all that comes up.

Raj

David Gilbert

Re: demo compilation problems

Post by David Gilbert » Mon Aug 12, 2002 11:37 pm

In that case, it is almost certainly a regular classpath issue. Post the full command you are using to run the demo and I'll try to spot the problem.

Regards,

DG.

Raj

Re: demo compilation problems

Post by Raj » Tue Aug 13, 2002 7:35 pm

Sorry, the problem was I was not running the java command properly, with java com.jrefinery.chart.demo.XYSeriesDemo . Now the demo runs fine.

I have a new problem:
I have written a class very similar to XYSeriesDemo.java called Timeser.java
set my classpath to jcommon-0.6.4.jar and jfreechart-0.9.2jar.
The new class timeser.java compiles fine. When I try run timser with command
java Timeser
The following error occurs
Exception in thread "main" java.lang.NoClassDefFoundError: Timeser

Locked