0

when I run my server application on eclipse it doesn't work and the error is shown as following:

java.net.SocketException: Unrecognized Windows Sockets error: 0: 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.<init>(Unknown Source)
    at java.net.ServerSocket.<init>(Unknown Source)
    at MyServer.main(MyServer.java:17)
Exception in thread "main" java.lang.NullPointerException
    at MyServer.main(MyServer.java:26)
user875264
  • 55
  • 2

1 Answers1

1

I think you forgot to initialize the port and you are trying to connect to port=0 that is invalid. I thing that your application receives port via command line. When you are running it from eclipse you forgot to provide it. Do it using the run/debug configuration.

It is just a theory. I do not see your code.

AlexR
  • 114,158
  • 16
  • 130
  • 208