java.net.BindException: Address already in use: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.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 scene.URLOpWatcher.run(URLOpWatcher.java:50)
一个Applet不停的刷新从服务器读取消息,但是一小段时间后就会报这个错,是什么问题哦?
------解决方法--------------------------------------------------------
服务端口冲突
------解决方法--------------------------------------------------------
你使用的端口号已经被别的应用程序使用了,如果你想查看是哪个应用程序占用了你想使用的端口号的话,可以使用Active Ports这个软件来查看你的电脑上所有的运行程序目前已经使用的端口号
------解决方法--------------------------------------------------------
java.net.BindException: Address already in use: connect
很明显是端口冲突了,换一个没有被用过的端口就行了
------解决方法--------------------------------------------------------
用dos环境的netstat看端口的使用情况就好了