Applet第一次加载并成功运行,但是当我们离开页面时 并再次尝试导航到同一页面,找不到类异常。
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.
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:
请提供解决方案
答案 0 :(得分:0)
我有同样的问题,但在我的情况下是关于从location.href捕获URL。 使用JSF时,第一次访问并没有带来真正的页面URL,但巧合的是,applet就在那里。再次单击后,将显示实际页面URL,并且找不到applet jar。 我解决了相对于基本URL的固定jar位置,而不是当前页面的位置。