dcsimg
java.net.BindException: Address already in use: JVM_Bind.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Core_Java
Posted On:   Thursday, October 20, 2005 08:29 AM

I get this message when i run a socket program ServerSocket ss=new ServerSocket(6800); Socket s=ss.accept(); System.out.println("Client Accepted"); BufferedReader br=new BufferedReadernew InputStreamReader(s.getInputStream())); System.out.println(br.readLine()); PrintWriter wr=new PrintWriter(new OutputStreamWriter(s.getOutputStream()),true); wr.println("Welcome to Socket Programming"); I have written a similar kind of program in c# which is a client server Tried with different ports,But still gives the same error. Pls Help.    More>>

I get this message when i run a socket program
ServerSocket ss=new ServerSocket(6800);
Socket s=ss.accept();
System.out.println("Client Accepted");
BufferedReader br=new BufferedReadernew
InputStreamReader(s.getInputStream()));
System.out.println(br.readLine());
PrintWriter wr=new PrintWriter(new
OutputStreamWriter(s.getOutputStream()),true);
wr.println("Welcome to Socket Programming");

I have written a similar kind of program in c# which is a client server

Tried with different ports,But still gives the same error.

Pls Help.

   <<Less

Re: java.net.BindException: Address already in use: JVM_Bind.

Posted By:   WarnerJan_Veldhuis  
Posted On:   Thursday, October 20, 2005 09:24 AM

Well, obviously, port 6800 is in use... On Windows XP type "netstat -a -n -o" to find out which PID is using this port. Then find the PID in the TaskManager... Then kill the process :)
About | Sitemap | Contact