I always rebuild the source after downloading a new version of JFreeChart and use the resulting jar file in my development.
I downloaded the newest version of JFreeChart today and rebuilt the source as usual. When I deployed the jar file, I got a "ClassDefNotFoundError" in the JFreeChartClass and was unable to produce any charts.
After digging into it a little, I narrowed it down to the JFreeChartInfo class (declared in JFreeChart.java). It performs the following:
ImageIcon temp = new ImageIcon(JFreeChart.class.getResource("gorilla.jpg"));
The image gorilla.jpg is not included in the source distribution, but is included in the jars\jfreechart-0.9.2.jar file that was released. After I extracted the image and included it in my new jar file, everything began working fine.
Can you include the file in the source distribution so that we can include it in builds? Also, it might be helpful to throw a try...catch block around that call and throw a more descriptive error (e.g. FileNotFoundException) to aid developers if they should happen into a similar situation.
Thanks for the continued hard work on the project!
Regards,
David
Rebuilding jfreechart 0.9.1 / gorilla.jpg
Re: Rebuilding jfreechart 0.9.1 / gorilla.jpg
Excuse me... the title of the message should read: "Rebuilding JFreeChart 0.9.2". Sorry for any confusion that may cause.
Re: Rebuilding jfreechart 0.9.1 / gorilla.jpg
Hi David,
Thanks for your post, and sorry for the inconvenience caused by not including the image file along with the source. I will include it in the next release (which unfortunately will be some weeks away).
Regards,
DG.
Thanks for your post, and sorry for the inconvenience caused by not including the image file along with the source. I will include it in the next release (which unfortunately will be some weeks away).
Regards,
DG.