在我的机器上更新JRE后,Applet无法正常工作

时间:2013-07-10 16:21:44

标签: java security applet japplet connectexception

将我的Java更新到最新版本后,我有一个停止工作的applet 这是错误:

Avertissement : un plug-in première génération est utilisé.
Ce plug-in est en phase d'abandon et sera supprimé de la prochaine version 
majeure de Java. Signalez toute difficulté technique que vous rencontrez 
avec le plug-in nouvelle génération sur http://bugs.sun.comPlug-in Java 1.7.0_25
Utilisation de la version JRE 1.7.0_25-b17 Java HotSpot(TM) Client VM
Répertoire d'origine de l'utilisateur = C:\Documents and Settings\jndayra
----------------------------------------------------
c:   effacer la fenêtre de la console
f:   finaliser les objets de la file d'attente de finalisation
g:   nettoyer la mémoire
h:   afficher ce message d'aide
l:   vider la liste des chargeurs de classes
m:   imprimer le relevé d'utilisation de la mémoire
o:   déclencher la journalisation
p:   recharger la configuration du proxy
q:   masquer la console
r:   recharger la configuration des règles
s:   vider les propriétés système et de déploiement
t:   vider la liste des threads
v:   vider la pile des threads
x:   effacer le cache de chargeurs de classes
0-5: fixer le niveau de trace à <n>
----------------------------------------------------

java.net.ConnectException: Connection refused: connect
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at com.sun.deploy.net.proxy.AbstractAutoProxyHandler.getJSFileFromURL(Unknown Source)
at com.sun.deploy.net.proxy.AbstractAutoProxyHandler.init(Unknown Source)
at com.sun.deploy.net.proxy.DynamicProxyManager.reset(Unknown Source)
at com.sun.deploy.net.proxy.DeployProxySelector.reset(Unknown Source)
at sun.plugin.AppletViewer.initEnvironment(Unknown Source)
at sun.plugin.AppletViewer.initEnvironment(Unknown Source)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.TwoStacksPlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(Unknown Source)
at java.net.URLConnection.getContentType(Unknown Source)
at com.sun.deploy.net.proxy.AbstractAutoProxyHandler.isSupportedINSFile(Unknown Source)
... 5 more

Charger : la classe UI.class est introuvable.
java.lang.ClassNotFoundException: UI.class
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

错误消息的翻译部分:

Warning : A first generation plug-in is being used.
This plug-in is being abandoned (depreciated) and will be deleted from the next
    major version of Java.  Report all technical difficulties that you encounter 
    with the new generation plug-in at http://bugs.sun.comPlug-in Java 1.7.0_25
    Using JRE version 1.7.0_25-b17 Java HotSpot(TM) Client VM
    Home directory of the user = C:\Documents and Settings\jndayra
----------------------------------------------------
c:   close the console window
f:   finalize objects on the finalisation queue
g:   clean memory
h:   open this help message
l:   empty the list of class loaders
m:   print the usage record of the memory
o:   activate logging
p:   Reload the proxy configuration
q:   hide the console
r:   relead the rule configurations
s:   empty the system and deployment properties
t:   empty the list of threads
v:   empty the pile of threads
x:   erase the class loader cache
0-5: set the trace level to <n>

Load : the class UI.class is unfindable.
java.lang.ClassNotFoundException: UI.class
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
    //etc

我之前遇到过这个问题,我修复它的方法是通过添加此行来允许我的java.policy中的所有权限。

   grant {
     permission java.security.AllPermission;
   };

这解决了之前的问题,但现在不再有用了。

1 个答案:

答案 0 :(得分:1)

这一行以上的一切都无关紧要:

java.net.ConnectException: Connection refused: connect

这只是意味着您的applet在网络级别遇到问题( Java安全性)。它所连接的主机拒绝连接,这通常意味着没有服务监听host:port