2013-02-27 51 views
2

小程序第一次加載並運行成功,但當我們離開頁面 並再次嘗試導航到同一頁面時沒有找到類沒有發現異常。小程序無法在頁面刷新後或導航到相同頁面後重新加載,第二次獲取classNotFoundException(頁面刷新後)

使用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. 

使用罐

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

今天早上我用我的小程序面對同樣的問題。 – 2013-02-27 07:16:45

回答

0

我有同樣的問題,但對我來說是關於從放在location.href捕獲URL。 使用JSF時,第一次訪問沒有帶來實際的頁面URL,但巧合的是,小程序在那裏。第二次點擊後,將顯示真實頁面的URL並找不到applet jar。 我通過將固定的jar位置相對於基本URL而不是當前頁面的位置來解決。