JFreeChartDemo
JFreeChartDemo
I can't get the JFreeChartDemo to run. I have the SDK 1_4 installed. When I run the command provided in the JFreeChart Installation Instructions (pg. 14) I get error: Exception in thread "main" java.lang.NoClassDefFoundError: com/jrefinery/chart/demo/jfreechartdemo.
My JFree chart is unpacked to C:\jfreechart-0.9.2. I am running Windows.
How do I modify the "C:\java -classpath %jarfiles% com.jrefinery.chart.demo.JFreeChartDemo" in order for the demo to run?-
My JFree chart is unpacked to C:\jfreechart-0.9.2. I am running Windows.
How do I modify the "C:\java -classpath %jarfiles% com.jrefinery.chart.demo.JFreeChartDemo" in order for the demo to run?-
Re: JFreeChartDemo
You should use Sun ONE Studio. It is a visual environment that is very easy to use.
Re: JFreeChartDemo
I got the same type of errors using Sun One Studio. I mounted the jcommon and jfreechart directories. Class compiles, but get same errors when I execute the program. Thanks.
Re: JFreeChartDemo
I had the same problem.
In the readme file the command has a ':' instead of a ';' part way through the path statement. CD to the 'jars' directory then paste and run this command:
java -classpath jcommon-0.6.4.jar;jfreechart-0.9.2.jar;jfreechart-0.9.2-demo.jar com.jrefinery.chart.demo.JFreeChartDemo
Should work.
In the readme file the command has a ':' instead of a ';' part way through the path statement. CD to the 'jars' directory then paste and run this command:
java -classpath jcommon-0.6.4.jar;jfreechart-0.9.2.jar;jfreechart-0.9.2-demo.jar com.jrefinery.chart.demo.JFreeChartDemo
Should work.
Re: JFreeChartDemo
Hello, I have the same problem, and I have tried everything that is written here. ANd I still get the same error message!
Can someone please help us.
Thanks
Can someone please help us.
Thanks
Re: JFreeChartDemo
Please post a transcript of the command you entered and the exception generated, and I'll try to help.
Regards,
DG.
Regards,
DG.
Re: JFreeChartDemo
I tried compiling and running XYSeriesDemo.java
Located in com/jrefinery/chart/demo
I get the following errors:
demo/XYSeriesDemo.java [5:1] package com.jrefinery.data does not exist
import com.jrefinery.data.XYSeries;
^
demo/XYSeriesDemo.java [6:1] package com.jrefinery.data does not exist
import com.jrefinery.data.XYSeriesCollection;
^
demo/XYSeriesDemo.java [7:1] package com.jrefinery.ui does not exist
import com.jrefinery.ui.ApplicationFrame;
^
demo/XYSeriesDemo.java [8:1] package com.jrefinery.chart does not exist
import com.jrefinery.chart.JFreeChart;
^
demo/XYSeriesDemo.java [9:1] package com.jrefinery.chart does not exist
import com.jrefinery.chart.ChartFactory;
^
demo/XYSeriesDemo.java [10:1] package com.jrefinery.chart does not exist
import com.jrefinery.chart.ChartPanel;
^
demo/XYSeriesDemo.java [12:1] cannot resolve symbol
symbol : class ApplicationFrame
location: class com.jrefinery.chart.demo.XYSeriesDemo
public class XYSeriesDemo extends ApplicationFrame {
^
demo/XYSeriesDemo.java [14:1] cannot resolve symbol
symbol : class XYSeries
location: class com.jrefinery.chart.demo.XYSeriesDemo
protected XYSeries series;
^
demo/XYSeriesDemo.java [21:1] cannot resolve symbol
symbol : class XYSeries
location: class com.jrefinery.chart.demo.XYSeriesDemo
this.series = new XYSeries("40SUC");
^
demo/XYSeriesDemo.java [141:1] cannot resolve symbol
symbol : class XYSeriesCollection
location: class com.jrefinery.chart.demo.XYSeriesDemo
XYSeriesCollection data = new XYSeriesCollection(series);
^
demo/XYSeriesDemo.java [141:1] cannot resolve symbol
symbol : class XYSeriesCollection
location: class com.jrefinery.chart.demo.XYSeriesDemo
XYSeriesCollection data = new XYSeriesCollection(series);
^
demo/XYSeriesDemo.java [142:1] cannot resolve symbol
symbol : class JFreeChart
location: class com.jrefinery.chart.demo.XYSeriesDemo
JFreeChart chart = ChartFactory.createXYChart("XY Series Demo", "X", "Y", data, true);
^
demo/XYSeriesDemo.java [142:1] cannot resolve symbol
symbol : variable ChartFactory
location: class com.jrefinery.chart.demo.XYSeriesDemo
JFreeChart chart = ChartFactory.createXYChart("XY Series Demo", "X", "Y", data, true);
^
demo/XYSeriesDemo.java [145:1] cannot resolve symbol
symbol : class ChartPanel
location: class com.jrefinery.chart.demo.XYSeriesDemo
ChartPanel chartPanel = new ChartPanel(chart);
^
demo/XYSeriesDemo.java [145:1] cannot resolve symbol
symbol : class ChartPanel
location: class com.jrefinery.chart.demo.XYSeriesDemo
ChartPanel chartPanel = new ChartPanel(chart);
^
demo/XYSeriesDemo.java [155:1] cannot resolve symbol
symbol : method pack ()
location: class com.jrefinery.chart.demo.XYSeriesDemo
demo.pack();
^
demo/XYSeriesDemo.java [156:1] cannot resolve symbol
symbol : method setVisible (boolean)
location: class com.jrefinery.chart.demo.XYSeriesDemo
demo.setVisible(true);
^
17 errors
Errors compiling class XYSeriesDemo.
Located in com/jrefinery/chart/demo
I get the following errors:
demo/XYSeriesDemo.java [5:1] package com.jrefinery.data does not exist
import com.jrefinery.data.XYSeries;
^
demo/XYSeriesDemo.java [6:1] package com.jrefinery.data does not exist
import com.jrefinery.data.XYSeriesCollection;
^
demo/XYSeriesDemo.java [7:1] package com.jrefinery.ui does not exist
import com.jrefinery.ui.ApplicationFrame;
^
demo/XYSeriesDemo.java [8:1] package com.jrefinery.chart does not exist
import com.jrefinery.chart.JFreeChart;
^
demo/XYSeriesDemo.java [9:1] package com.jrefinery.chart does not exist
import com.jrefinery.chart.ChartFactory;
^
demo/XYSeriesDemo.java [10:1] package com.jrefinery.chart does not exist
import com.jrefinery.chart.ChartPanel;
^
demo/XYSeriesDemo.java [12:1] cannot resolve symbol
symbol : class ApplicationFrame
location: class com.jrefinery.chart.demo.XYSeriesDemo
public class XYSeriesDemo extends ApplicationFrame {
^
demo/XYSeriesDemo.java [14:1] cannot resolve symbol
symbol : class XYSeries
location: class com.jrefinery.chart.demo.XYSeriesDemo
protected XYSeries series;
^
demo/XYSeriesDemo.java [21:1] cannot resolve symbol
symbol : class XYSeries
location: class com.jrefinery.chart.demo.XYSeriesDemo
this.series = new XYSeries("40SUC");
^
demo/XYSeriesDemo.java [141:1] cannot resolve symbol
symbol : class XYSeriesCollection
location: class com.jrefinery.chart.demo.XYSeriesDemo
XYSeriesCollection data = new XYSeriesCollection(series);
^
demo/XYSeriesDemo.java [141:1] cannot resolve symbol
symbol : class XYSeriesCollection
location: class com.jrefinery.chart.demo.XYSeriesDemo
XYSeriesCollection data = new XYSeriesCollection(series);
^
demo/XYSeriesDemo.java [142:1] cannot resolve symbol
symbol : class JFreeChart
location: class com.jrefinery.chart.demo.XYSeriesDemo
JFreeChart chart = ChartFactory.createXYChart("XY Series Demo", "X", "Y", data, true);
^
demo/XYSeriesDemo.java [142:1] cannot resolve symbol
symbol : variable ChartFactory
location: class com.jrefinery.chart.demo.XYSeriesDemo
JFreeChart chart = ChartFactory.createXYChart("XY Series Demo", "X", "Y", data, true);
^
demo/XYSeriesDemo.java [145:1] cannot resolve symbol
symbol : class ChartPanel
location: class com.jrefinery.chart.demo.XYSeriesDemo
ChartPanel chartPanel = new ChartPanel(chart);
^
demo/XYSeriesDemo.java [145:1] cannot resolve symbol
symbol : class ChartPanel
location: class com.jrefinery.chart.demo.XYSeriesDemo
ChartPanel chartPanel = new ChartPanel(chart);
^
demo/XYSeriesDemo.java [155:1] cannot resolve symbol
symbol : method pack ()
location: class com.jrefinery.chart.demo.XYSeriesDemo
demo.pack();
^
demo/XYSeriesDemo.java [156:1] cannot resolve symbol
symbol : method setVisible (boolean)
location: class com.jrefinery.chart.demo.XYSeriesDemo
demo.setVisible(true);
^
17 errors
Errors compiling class XYSeriesDemo.
Re: JFreeChartDemo
Thanks Geoff, this worked! (1) I unzipped JFreeChart-0.9.2 to the root of C:\ on Windows. (2) I ran the command listed in Geoff's post from the Jars directory. my command prompt looked like:
C:\C:\jfreechart-0.9.2\jars>java -classpath jcommon-0.6.4.jar;jfreechart-0.9.2.jar;jfreechart-0.9.2-demo.jar com.jrefinery.chart.demo.JFreeChartDemo
This worked. I did not do any other compiling of specific java files. The JFreeChartDemo runs an app that displays all of the different charts available through JFreeChartDemo.
Also, the command is case sensitive! At one point my manager and I did run the right command from the right directory, but it was in the wrong case so it failed.
C:\C:\jfreechart-0.9.2\jars>java -classpath jcommon-0.6.4.jar;jfreechart-0.9.2.jar;jfreechart-0.9.2-demo.jar com.jrefinery.chart.demo.JFreeChartDemo
This worked. I did not do any other compiling of specific java files. The JFreeChartDemo runs an app that displays all of the different charts available through JFreeChartDemo.
Also, the command is case sensitive! At one point my manager and I did run the right command from the right directory, but it was in the wrong case so it failed.
Re: JFreeChartDemo
You need to specify the sourcepath so that the compiler knows where to find those other files.
Regards,
DG.
Regards,
DG.
Re: JFreeChartDemo
According to what Geoff Granum had shown us, it works on me. I simply changed the ":" to ";", and it worked.
Re: JFreeChartDemo
I have been shown the JFreeChartDemo in JBuilder7 IDE. But before i used the all demos, i have recompiled all the source codes. some problem occured while i done it. but i can not remember all the errors, if you want to know it, give me a mail address, i can send it to you.
problems like above, maybe it happens caused by Environment Setting.
problems like above, maybe it happens caused by Environment Setting.