Solved

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

Posted on 2008-06-26
3
1,000 Views
Last Modified: 2013-12-29
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
Comment
Question by:jacob_412
3 Comments
 
LVL 92

Expert Comment

by:objects
ID: 21879880
don't think it can be done from java . would need native code I'd think

0
 
LVL 13

Accepted Solution

by:
MicheleMarcon earned 500 total points
ID: 21881400
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
 

Author Closing Comment

by:jacob_412
ID: 31471101
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question