free ports
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Carlos_Silva
Posted On:   Sunday, July 20, 2003 07:41 AM

Please, how I get busy ports in my computer?
Embrace,
CarloSilva

Re: free ports

Posted By:   Thomas_Hackel  
Posted On:   Monday, July 21, 2003 04:28 AM

IMO there is no possiblitity to get a "list" of used ports on a system.

An ugly way of checking if there are listening(server) processes is to create a ServerSocket for each port and see if an Exception was thrown. When the ex occures the port is used by another process.


But this is an VERY ugly way.

Dont write operation system tools in Java :-)

About | Sitemap | Contact