I have written a simple code of server side programming that is waiting for the response from client, this runs successfully on the cmd.exe
but while executing it on the eclipse it is throwing exception, the details of exception are as follows;
Exception in thread "main" java.net.BindException: Address already in use: JVM_Bind
this is happening in eclipse only could anyone please tell me how it is working in eclipse & how in cmd.exe
the code of server side program is :
package networking;
import java.io.*;
import java.net.*;
public class Server1 {
public static void main(String args[]) throws Exception {
ServerSocket sock = new ServerSocket(5000);
Socket s1 = sock.accept();
BufferedReader br = new BufferedReader(new InputStreamReader(
s1.getInputStream()));
String msg = br.readLine();
}
}