簡體   English   中英

在刷新頁面或導航到同一頁面之后,Applet無法重新加載,第二次獲取classNotFoundException(刷新頁面之后)

[英]Applet fails to reload after page refresh or after navigating to same page, getting classNotFoundException second time (after page refresh)

Applet首次成功加載並成功運行,但是當我們離開頁面並再次嘗試導航到同一頁面時,找不到類Exception。

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

請提供解決方案

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM