2

最近,我的 JavaFX 应用程序似乎总是在启动时尝试连接到某些东西。此过程会使我的应用程序挂起一段时间,并使我的应用程序启动时间延长约 20 秒。这是我看到的错误:

java.net.ConnectException: Connection timed out: connect
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
rce)
        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(Unkno
wn Source)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown So
urce)
        at com.sun.deploy.net.proxy.AbstractAutoProxyHandler.getJSFileFromURL(Un
known 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.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.javafx.main.Main.tryToSetProxy(Main.java:572)
        at com.javafx.main.Main.launchApp(Main.java:640)
        at com.javafx.main.Main.main(Main.java:805)
Caused by: java.net.ConnectException: Connection timed out: connect
        at java.net.DualStackPlainSocketImpl.connect0(Native Method)
        at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
        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 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 Sour
ce)
        at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown So
urce)
        at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(Unknown So
urce)
        at java.net.URLConnection.getContentType(Unknown Source)
        at com.sun.deploy.net.proxy.AbstractAutoProxyHandler.isSupportedINSFile(
Unknown Source)
        ... 10 more

如果我从 IDE 运行,我看不到它试图连接。那么这是某种基于预言机的间谍活动吗?是什么赋予了?

4

1 回答 1

0

我认为它试图以某种方式自动检测代理。

我能够在 Java 控制面板中解决这个问题。在General选项卡上的Network Settings...对话框中,从 切换Use browser settingsDirect connection

(不过,我找不到在 Firefox 或 IE 中指定的任何代理设置。)

于 2013-11-18T16:52:05.393 回答