Solved

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

Posted on 2008-06-26
3
1,002 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

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

This article is about some of the basic and important steps to be used to improve the performance in web-sphere commerce application development. 1) Always leverage the Dyna-caching facility provided by the product 2) Remove the unwanted code …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

726 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