Re: Deploy applet with JNLP file load wrong package
SamuelXiao wrote:
Hi all, I am deploying an applet containing a jnlp file. I follow the
instructions from http://download.oracle.com/javase/tutorial/deployment/a=
pplet/deployin...
it is work when I tried its sample, however, when I changed the
AppletPage.html and xxx-applet.jnlp with my applet, it always loads
the wrong package and I am sure my code was compiled correctly.
But for the html using
jnlp, it always load the wrong package and results in classNoFound [sic].
Below is the error from java console.
Java Plug-in 1.6.0_22
applets.MonopolyEntry=E3=80=82
java.lang.ClassNotFoundException: applets.MonopolyEntry
at sun.plugin2.applet.Plugin2ClassLoader$2.ru=
n(Unknown Source)
at java.security.AccessController.doPrivilege=
d(Native Method)
at sun.plugin2.applet.Plugin2ClassLoader.find=
ClassHelper(Unknown
Source)
at sun.plugin2.applet.JNLP2ClassLoader.findCl=
ass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.load=
Class0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.load=
Class(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.load=
Class(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown So=
urce)
at sun.plugin2.applet.Plugin2ClassLoader.load=
Code(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createAp=
plet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager
$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception=EF=BC=9Ajava.lang.ClassNotFoundException: applets.MonopolyEntry
My MonopolyEntry.class is under applet (no 's') folder instead of
applets folder,
There's your trouble right there. The program is asking for
'applets.MonopolyEntry' but you don't have any such class.
What is the 'package' declaration inside MonopolyEntry.java?
What code is trying to refer to 'applets.MonopolyEntry'? (Hint: Use
your editor's "Find" command.)
--
Lew