Solved

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

Posted on 2008-06-26
3
998 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Upgrading Tomcat – There are a couple of methods to upgrade Tomcat is to use The Apache Installer is to download and unzip and run the services.bat remove|install Tomcat6 Because of the App that we are working with, we can only use Tomcat 6.…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

747 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now