Hello,
I've developed a client/server application to send datagram packets and receive them through the UDP protocol using two classes
this is the Server class
this is the Client class
The problem is that when i try to run the server class from the command prompt :
javac Server.java
// this works well but when i try to run it using this command:
java Server
//it throws this exception:
Exception in thread "main" java.net.SocketException: Unrecognized Windows Sockets error: 0: Cannot bind
at java.net.PlainDatagramSocketImpl.bind0(Native Method)
at java.net.PlainDatagramSocketImpl.bind(PlainDatagramSocketImpl.java:82)
at java.net.DatagramSocket.bind(DatagramSocket.java:368)
at java.net.DatagramSocket.<init>(DatagramSocket.java:210)
at java.net.DatagramSocket.<init>(DatagramSocket.java:261)
at java.net.DatagramSocket.<init>(DatagramSocket.java:234)
at Server.main(Server.java:8)
How can i get rid of this problem?
thanks in advance