Alejandro
Alejandro

Reputation: 421

How do i close an opened port in Windows 7?

when i try to start my java based server there is a message that says the port is already in use... And all my java web servers are stopped... So if anyone can help me i will appreciate it...

Upvotes: 4

Views: 30980

Answers (3)

Anup
Anup

Reputation: 488

I was trying to establish socket communication between PC(JAVA Server)<-->Android(Client)

on Debugging, popped the problem : Address already in use

instant/feasible resolution i found out was to:

  • run cmd as adminstrator
  • netstat -abn
  • find the process listening to the port of intrest
  • terminate the process from task manager

PS : Unlike from an external application mentioned in previous answers, steps in this answer allows you to find out the used ports with the resources already present.

Upvotes: 5

CrazyDart
CrazyDart

Reputation: 3801

A few options... us TCPView to find the program that has the port open and kill it... reboot... just reset the network connection. Try those.

Upvotes: 3

Jim Brissom
Jim Brissom

Reputation: 32919

If there is really still a process that has the port open, you can easily check for that (and close the process) via TCPView. It might be that the port is just lingering (for example due to not being shutdown properly), in which case you'd have to wait for the socket to close and check that the code is clear with regard to that.

Upvotes: 17

Related Questions