[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1009
  • Last Modified:

How do I find if a particular port is free on the local machine

I would like to find from a Java program if a particular port of the machine on which the program runs is free. I DO NOT want to bind to that port. I just want to identify if the port is free.
0
jacob_412
Asked:
jacob_412
1 Solution
 
objectsCommented:
don't think it can be done from java . would need native code I'd think

0
 
MicheleMarconCommented:
The only way of knowing it with Java is connecting... but you don't accept this solution.

http://www.cafeaulait.org/course/week12/16.html
0
 
jacob_412Author Commented:
Thanks ! If it is not possible to check if a port is free without connecting, I guess I'll have to accept it an work on this solution.
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now