0
I have embedded an applet (jar file)in a html page 

Now when I am trying to access the web page , it is giving the following error.

<APPLET CODE="com.xxx.tru.ReadNFCSerialNumber" NAME="Read" ID="Read" MAYSCRIPT alt="Photo Id"   ARCHIVE="\test.jar, \ojdbc14.signed.jar, \ojdbc14_g.signed.jar" WIDTH="100%"  HEIGHT="100%"  HSPACE="1"  VSPACE="1">
</APPLET>




load: class com.xxx.tru.ReadNFCSerialNumber not found.
java.lang.ClassNotFoundException: com.xxx.tru.ReadNFCSerialNumber
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Caused by: java.io.IOException: open HTTP connection failed:http://localhost/popit/POPit/com/xxx/tru/ReadNFCSerialNumber.class
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 7 more
Exception: java.lang.ClassNotFoundException: com.xxx.tru.ReadNFCSerialNumber

What am i doing wrong??

2
  • 1
    open HTTP connection failed:http://localhost/popit/POPit/com/xxx/tru/ReadNFCSerialNumber.class there you go Commented Feb 2, 2010 at 12:15
  • can u be more specific? i didnt got wt u meant Commented Feb 2, 2010 at 12:17

2 Answers 2

1

The web browser is trying to load your class from the URI http://localhost/popit/POPit/com/xxx/tru/ReadNFCSerialNumber.class instead of your jar file. The contents of the ARCHIVE attribute looks suspicious to me. Is it really supposed to be a comma-and-space delimited list? Also, the backslashes in front of the file names look suspicious:

ARCHIVE="\test.jar, \ojdbc14.signed.jar, \ojdbc14_g.signed.jar"

I would suggest you look into fixing the ARCHIVE attribute and then see if the web browser will load the class file form the jar as you want it to do.

Sign up to request clarification or add additional context in comments.

Comments

0

the CODEBASE attribute is missing. just a thought.code base

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.