Posts tagged ‘TCP’

October 16, 2011

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

by Jay Jonas

Just have some fun with Java sockets API in a Windows enviroment? So, what I could I say, just happens! Here is a solution.

Open the Command Prompt and follows these steps:

  • Find out if tcp port is really in use:
C:> netstat -na
  • Find out which process is binded on that por, in case it’s in use:
C:> netstat -abnovp tcp
This command may be a litte slow to return their results
  • To kill the process, take the PID (Process ID) in the lastest column and run this command:
C:> taskkill /pid <process_id_goes_here> /f

Finally, you can download the TCPView, a freebie from Microsoft.

TCPView is a Windows program that will show you detailed listings of all TCP and UDP endpoints on your system, including the local and remote addresses and state of TCP connections.
 

// http://technet.microsoft.com/en-us/sysinternals/bb897437

A more little tip: fix your sofware!

Advertisements
Tags: ,