I have created an Applet but I am not able to view it in a browser. It works fine with Applet Viewer. I create a jar file with all the .class files that are needed and also all the .class files are included in the directory with the browser page with their appropriate paths. The error I am getting is:
java.lang.NoClassDefFoundError
at com.jrefinery.chart.ChartFactory.createVerticalBarChart(ChartFactory.java:97)
at SwingApplet.setupGraph(SwingApplet.java:88)
at SwingApplet.init(SwingApplet.java:35)
at sun.applet.AppletPanel.run(AppletPanel.java:341)
at java.lang.Thread.run(Thread.java:536)
Can anyone help me out?
NoClassDefFoundError
Re: NoClassDefFoundError
When it comes to applets, I'm not sure. I presume your browser supports Java 2 (required since JFreeChart makes use of the Java2D API).
Regards,
DG.
Regards,
DG.
Re: NoClassDefFoundError
I ran into the same problem using PieDatasets in an applet. The problem seems to be that the applet is looking for the JFreeChart classes in the JVM of the client browser.
To solve this I plaved the JFreeChart, and JCommon jars in the directory of the applet and included them in the archive property of the Applet HTML tag.
<APPLET CODE="" ARCHIVE="jcommon-0.6.4.jar,jfreechart-0.9.2.jar"></Applet>
I hope that helps.
To solve this I plaved the JFreeChart, and JCommon jars in the directory of the applet and included them in the archive property of the Applet HTML tag.
<APPLET CODE="" ARCHIVE="jcommon-0.6.4.jar,jfreechart-0.9.2.jar"></Applet>
I hope that helps.