File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Sockets and Internet Protocols and the fly likes java.net.BindException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "java.net.BindException" Watch "java.net.BindException" New topic
Author

java.net.BindException

Alex Rugav
Greenhorn

Joined: May 03, 2006
Posts: 19
i am getting this exception
java.net.BindException : Address already in use : JVM_Bind
how do you unbind?
how do you close a socket connection?
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

Some other program altogether -- or a previously executed copy of the same program -- may already be running, bound to that same port. What port are you trying to listen on?


[Jess in Action][AskingGoodQuestions]
Alex Rugav
Greenhorn

Joined: May 03, 2006
Posts: 19
i used 3306,5050,1080, e.t.c after some time i am getting the error. its because i am failing to close a socket connection after i exit from the system.i am simulating my client server app.
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
There is already some application running at that port.many times even if you close the application the jvm keeps on running..in that case you can use the program manager of your app;ication for checking and killing any unnecessay program that might be using that port..some of the program make thread that make use of the port and if the threads are not demon then they would continue to run even after the main method..so in that case it still migh be using the port...so kill that application that is using the port and then again start the server...

--Rahul B
SCJP 1.4


Rahul Bhattacharjee
LinkedIn - Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.net.BindException