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 :-)