目录

我的学习分享

记录精彩的程序人生

java.net.MalformedURLException: unknown protocol: socket

https://community.oracle.com/thread/1305696?tstart=0

Hi.  
  
I have an app deployed with java web start. It runs fine with java5.  
  
If i update the machines to java6 it works in some (windows and linux) but not on other (windows).  
  
The exception i get is:  
  
java.net.MalformedURLException: unknown protocol: socket  
  
Any ideas?
Problem solved!  
  
I noticed that the full trace of the errors contained something about proxies, so I got my friend (who has Win XP Home) to:  
  
1) go to Control Panel -> Java  
2) click the Network Settings button  
3) Select Direct Connection, and click ok a couple of times to exit  
  
No more errors! :) Sun - get this fixed ASAP!  
  
Here is more of the trace log if anyone is interested:  
  
java.net.MalformedURLException: unknown protocol: socket  
at java.net.URL.<init>(Unknown Source)  
at java.net.URL.<init>(Unknown Source)  
at java.net.URL.<init>(Unknown Source)  
at java.net.URI.toURL(Unknown Source)  
at  
com.sun.deploy.net.proxy.DeployProxySelector.connectFailed(Unknown Source)  
at java.net.SocksSocketImpl.connect(Unknown Source)  
at java.net.Socket.connect(Unknown Source)  
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(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