Hello,
Forgive me if this is a stupid question, but I am having trouble compiling the First.java on the Developer Guide documentation. I am getting the error "cannot resolve symbol" on all the imports. I have followed everything on the guide and was successfull in doing everything up to this point. What did I miss?
Getting "cannot resolve symbol" errors.
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Post the exact command line you entered and the error displayed.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


-
- Posts: 2
- Joined: Tue Oct 04, 2005 1:02 am
Hello Dave,
This is what I am getting:
C:\jfreechart-1.0.0-rc1>javac First.java
First.java:1: package org.jfree.chart does not exist
import org.jfree.chart.ChartFactory;
.
.
.
First.java:16: cannot resolve symbol
symbol : class DefaultPieDataset
location: class First
DefaultPieDataset dataset = new DefaultPieDataset();
These are the paths:
PATH=c:\j2sdk1.4.2_07\bin\;c:\jfreechart-1.0.0-rc1\;c:\apache-ant1.6.5\bin\
Thank you for your quick response.
Regards,
jmartin
This is what I am getting:
C:\jfreechart-1.0.0-rc1>javac First.java
First.java:1: package org.jfree.chart does not exist
import org.jfree.chart.ChartFactory;
.
.
.
First.java:16: cannot resolve symbol
symbol : class DefaultPieDataset
location: class First
DefaultPieDataset dataset = new DefaultPieDataset();
These are the paths:
PATH=c:\j2sdk1.4.2_07\bin\;c:\jfreechart-1.0.0-rc1\;c:\apache-ant1.6.5\bin\
Thank you for your quick response.
Regards,
jmartin
This is not a problem of jfreechart. Try to get a good book to find out more about java. In this case you forgot to tell the java compiler where to find the jfreechart library. The easiest way is to copy jfreechart-1.0.0-rc1.jar into the same directory as your First.java file and compile it like this:
javac -classpath jfreechart-1.0.0-rc1.jar First.java
Notice that for execution you have to specify the path of your resulting class file and the jfreechart library. Example:
java -classpath .;jfreechart-1.0.0-rc1.jar First
javac -classpath jfreechart-1.0.0-rc1.jar First.java
Notice that for execution you have to specify the path of your resulting class file and the jfreechart library. Example:
java -classpath .;jfreechart-1.0.0-rc1.jar First