Hello,
I downloaded yesterday JFreeChart and JCommon and i was able to compile without any problem, but at the time of running when i click on the Display button for the bar charts i got this error :
com.jrefinery.chart.demo.Resources.DataPackageResources not found.
I have looked for that class and it is not there. Can any one help where i can get this class from. Any help is much appreciated.
Regards,
Navin Pathuru
DataPackageResources not found.
Re: DataPackageResources not found.
Hi Navin,
I think you mean com.jrefinery.data.resources.DataPackageResources...the classes are loaded dynamically, so when you compile the demo application, it won't know to compile these classes (they are only referenced indirectly). So you need to invoke javac specifically for these classes.
Regards,
DG
I think you mean com.jrefinery.data.resources.DataPackageResources...the classes are loaded dynamically, so when you compile the demo application, it won't know to compile these classes (they are only referenced indirectly). So you need to invoke javac specifically for these classes.
Regards,
DG
Re: DataPackageResources not found.
Hi David,
Could you please explaing what this means "So you need to invoke javac specifically for these classes. "
Your help is much appreciated.
Regards,
Navin Pathuru
Could you please explaing what this means "So you need to invoke javac specifically for these classes. "
Your help is much appreciated.
Regards,
Navin Pathuru
Re: DataPackageResources not found.
Hi Navin,
Have a read of section 3.5 of the jfreechart-install.pdf document.
You used to be able to compile all the JFreeChart classes just by running javac (the command line Java compiler included in all JDKs) on the JFreeChartDemo.java source file. This would compile all the classes that JFreeChartDemo depends on.
But now we have resource bundles (just Java classes really) for some European languages...these are not referenced directly in the code, but get loaded by code like this:
// get a locale-specific resource bundle...
String baseResourceClass = "com.jrefinery.chart.demo.resources.DemoResources";
this.resources = ResourceBundle.getBundle(baseResourceClass);
So the compiler doesn't know it has to compile the DemoResources class (in the above example), so you have to compile it explicitly.
Now the instructions in jfreechart-install.pdf are up to date IF you use jcommon.jar. But I have a feeling the instructions for recompiling JCommon have not been updated to mention the com.jrefinery.data.resources package which also needs to be compiled explicitly.
I'll try to remember to update the instructions when JCommon 0.6.2 is released.
Regards,
DG.
Have a read of section 3.5 of the jfreechart-install.pdf document.
You used to be able to compile all the JFreeChart classes just by running javac (the command line Java compiler included in all JDKs) on the JFreeChartDemo.java source file. This would compile all the classes that JFreeChartDemo depends on.
But now we have resource bundles (just Java classes really) for some European languages...these are not referenced directly in the code, but get loaded by code like this:
// get a locale-specific resource bundle...
String baseResourceClass = "com.jrefinery.chart.demo.resources.DemoResources";
this.resources = ResourceBundle.getBundle(baseResourceClass);
So the compiler doesn't know it has to compile the DemoResources class (in the above example), so you have to compile it explicitly.
Now the instructions in jfreechart-install.pdf are up to date IF you use jcommon.jar. But I have a feeling the instructions for recompiling JCommon have not been updated to mention the com.jrefinery.data.resources package which also needs to be compiled explicitly.
I'll try to remember to update the instructions when JCommon 0.6.2 is released.
Regards,
DG.
Re: DataPackageResources not found.
Thanks David. This is resolved. I was looking at a wrong place for the class DataPackResource.
Thank you,
Navin Pathuru
Thank you,
Navin Pathuru