Problem with binding of ServerSocket to any local address on Windows Vista
843790Aug 29 2008 — edited Sep 8 2008Hello all.
I am using JRE 6 and trying to bind a ServerSocket to "anyLocalAddress" ("0.0.0.0" on IPv4 or "0::0" on IPv6).
Code sample:
serverSocket.bind(new InetSocketAddress(null, 12345));
On all plattforms except Windows Vista it works just fine, but on Windows Vista i receive the following exception, when trying to run the application:
java.net.SocketException: Socket operation on nonsocket: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(Unknown Source)
at java.net.ServerSocket.bind(Unknown Source)
at java.net.ServerSocket.bind(Unknown Source)
Is there any workaround for this problem?
Thanks in advance,
Michael.