2

Applet loads and run succesfully for first time but when we goes off the page and again try to navigate to same page getting class not found Exception.

Using jnlp

exception: JNLP file error: applet-test-applet.jnlp. Please make sure the file exists and check if "codebase" and "href" in the JNLP file are correct..
java.io.FileNotFoundException: JNLP file error: applet-test-applet.jnlp. Please make sure the file exists and check if "codebase" and "href" in the JNLP file are correct.
    at sun.plugin2.applet.JNLP2Manager.loadJarFiles(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Exception: java.io.FileNotFoundException: JNLP file error: applet-test-applet.jnlp. Please make sure the file exists and check if "codebase" and "href" in the JNLP file are correct.

Using Jar

load: class com.*.*.uidai.auth.*.class not found.
java.lang.ClassNotFoundException: com.*.cpos.uidai.auth.*.class
    at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.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)
Exception: java.lang.ClassNotFoundException: 

Please provide solution

1 Answers1

0

I had the same problem, but in my case was about capturing the URL from the location.href. When using JSF, the first access wasn't bringing the real page URL, but coincidentally, the applet was there. After clicking a second time, the real page URL would be displayed and the applet jar couldn't be found. I solved by putting a fixed jar location relative to the base URL, not by the location of the current page.

mrcaramori
  • 2,503
  • 4
  • 29
  • 47