Re: Applet deployment problem
On 27 Feb., 16:34, "John B. Matthews" <nos...@nospam.invalid> wrote:
In article
<a89e46a4-5c22-408e-af00-dc991e27b...@m24g2000vbp.googlegroups.com>,
NickPick <dickreu...@yahoo.com> wrote:
[...]
That's exactly what Netbean has done in my case (the Project's Jar
file is in the dist folder and the library jar files are in the
subfolder lib). On the other hand the html file calling the java
applet is in the build folder with a subfolder that contains the
applet.class file.
You may find it useful to enable the Java Console in your browser. On my
platform, this is done using the Java Preferences application.
Do I have to somehow merge these two folders? And why do I really
have to edit the html file so that it includes the Jar files?
Your HTML file has to reflect the locations of your applet class and any
associated jars. In this case, the JFreeChart & JCommon libraries are
required. Given a project named scratch, here is a typical applet tag
and corresponding class declaration:
<applet width=500 height=400
code="chart.ChartApplet.class"
archive="dist/scratch.jar,
dist/lib/jcommon-1.0.15.jar,
dist/lib/jfreechart-1.0.12.jar">
</applet>
package chart;
...
public class ChartApplet extends JApplet {
public void init() {
this.add(new RandomWalk());
}
}
class RandomWalk extends ChartPanel {
...
}
--
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>
I've put all those file in all possible sub folders and folder but I
still get an error message (albeit slightly shorter): Any advice is
appreciated.
java.lang.NoClassDefFoundError: org/jfree/data/general/PieDataset
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)