0

将我的 Java 更新到最新版本后,我的小程序停止工作这是错误:

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;
   };

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

4

1 回答 1

1

这条线以上的一切都是无关紧要的:

java.net.ConnectException: Connection refused: connect

这仅仅意味着您的小程序在网络级别(而不是Java 安全)遇到问题。它正在连接的主机拒绝连接,这通常意味着没有服务在监听host:port

于 2013-07-10T16:33:16.000 回答