I've been recompiling the JFreeChart code (I've tried both with ant, and using javac on the command-line), and when ever I try to execute the JFreeChartDemo class (or any other demo) I get the following error:
Exception in thread "main" java.lang.ExceptionInInitializerError
at com.jrefinery.chart.demo.JFreeChartDemo.<init>(Unknown Source)
at com.jrefinery.chart.demo.JFreeChartDemo.main(Unknown Source)
Caused by: java.lang.NullPointerException
at javax.swing.ImageIcon.<init>(ImageIcon.java:138)
at com.jrefinery.chart.JFreeChartInfo.<init>(Unknown Source)
at com.jrefinery.chart.JFreeChart.<clinit>(Unknown Source)
... 2 more
This happens irrespective of whether I use my newly compiled jars in the classpath, or use the root source directory as the classpath (jcommon is in the classpath regardless)
any ideas?
problems executing compiled code
Re: problems executing compiled code
I forgot to mention, I'm using java 1.4.0 from sun, on a debian linux system
Re: problems executing compiled code
Hi Vik,
The JFreeChartInfo class contains all the information for the "About" dialog displayed in the demo application, including the image of the gorilla (gorilla.jpg). This image gets loaded immediately, irrespective of whether or not it ever gets displayed...I already promised someone else that I would change this to use a "lazy" loading scheme. But for now, you should be able to just add the gorilla.jpg file to your jar file and you should be OK.
Regards,
DG.
The JFreeChartInfo class contains all the information for the "About" dialog displayed in the demo application, including the image of the gorilla (gorilla.jpg). This image gets loaded immediately, irrespective of whether or not it ever gets displayed...I already promised someone else that I would change this to use a "lazy" loading scheme. But for now, you should be able to just add the gorilla.jpg file to your jar file and you should be OK.
Regards,
DG.
Re: problems executing compiled code
yeah - just discovered that a little while ago, added it to the jar but it still didn't work; the gorilla.jpg file has been moved in CVS to the demo directory; it seems to require it to be in the chart directory.
cheers
vik
(can stop tearing out my hair now
cheers
vik
(can stop tearing out my hair now

Re: problems executing compiled code
I modified JFreeChart.java not to set the logo if the file does not exist; this is now in CVS.
Along with this, the gorilla should prolly included in the ant configuration.
vik
Along with this, the gorilla should prolly included in the ant configuration.
vik