Java (1.6.0_15) 无法在 Mac OS X Snow Leopard (10.6.2) 上运行。为什么?

Java (1.6.0_15) 无法在 Mac OS X Snow Leopard (10.6.2) 上运行。为什么?

我很长时间没有使用 Java 或访问过使用 Java 小程序的任何网站了。然而,今天我碰巧遇到了一个有 Java 小程序的网站,令我惊讶的是,我得到了以下信息安全异常错误:

java.net.MalformedURLException: unknown protocol: socket
at java.net.URL.<init>(URL.java:574)
at java.net.URL.<init>(URL.java:464)
at java.net.URL.<init>(URL.java:413)
at java.net.URI.toURL(URI.java:1081)
at com.sun.deploy.net.proxy.DeployProxySelector.connectFailed(DeployProxySelector.java:204)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:450)
at java.net.Socket.connect(Socket.java:525)
at sun.net.NetworkClient.doConnect(NetworkClient.java:161)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:233)
at sun.net.www.http.HttpClient.New(HttpClient.java:306)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:867)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:815)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:726)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1049)
at sun.plugin.PluginURLJarFileCallBack.downloadJAR(PluginURLJarFileCallBack.java:74)
at sun.plugin.PluginURLJarFileCallBack.access$000(PluginURLJarFileCallBack.java:48)
at sun.plugin.PluginURLJarFileCallBack$2.run(PluginURLJarFileCallBack.java:134)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin.PluginURLJarFileCallBack.retrieve(PluginURLJarFileCallBack.java:120)
at sun.net.www.protocol.jar.URLJarFile.retrieve(URLJarFile.java:186)
at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:50)
at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:68)
at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:104)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.connect(CachedJarURLConnection.java:191)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFileInternal(CachedJarURLConnection.java:145)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFile(CachedJarURLConnection.java:91)
at sun.misc.URLClassPath$JarLoader.getJarFile(URLClassPath.java:647)
at sun.misc.URLClassPath$JarLoader.access$600(URLClassPath.java:538)
at sun.misc.URLClassPath$JarLoader$1.run(URLClassPath.java:605)
at java.security.AccessController.doPrivileged(Native Method)
at sun.misc.URLClassPath$JarLoader.ensureOpen(URLClassPath.java:597)
at sun.misc.URLClassPath$JarLoader.<init>(URLClassPath.java:559)
at sun.misc.URLClassPath$3.run(URLClassPath.java:331)
at java.security.AccessController.doPrivileged(Native Method)
at sun.misc.URLClassPath.getLoader(URLClassPath.java:320)
at sun.misc.URLClassPath.getLoader(URLClassPath.java:297)
at sun.misc.URLClassPath.getResource(URLClassPath.java:167)
at java.net.URLClassLoader$1.run(URLClassLoader.java:192)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:171)
at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:143)
at java.lang.ClassLoader.loadClass(ClassLoader.java:254)
at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:682)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:785)
at sun.plugin.AppletViewer.createApplet(AppletViewer.java:2369)
at jep.AppletFramePanel.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:714)
at sun.applet.AppletPanel.run(AppletPanel.java:368)
at jep.AppletFramePanel.run(Unknown Source)
at java.lang.Thread.run(Thread.java:637)

我访问了 Java 网站并使用了如何测试 Java 是否在我的计算机上运行?并得到同样的错误。

有人知道如何修复 Snow Leopard 的 Java 1.6.0_15 或重新安装它吗?

答案1

这是一个代理设置问题. 尝试使用网络代理偏好设置。

相关内容