File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Sockets and Internet Protocols and the fly likes free port????? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "free port?????" Watch "free port?????" New topic

free port?????

Ajay Singhal
Ranch Hand

Joined: Jan 10, 2001
Posts: 37
hi! friends
i've a problem in socket communication. the problem is that i want to get the free ports on the remote machine
how can i do that.
and i also want to check that on a remote computer a application is running on which port.
if u have any idea then reply back.

Ajay Singhal
Ravee Bhat
Ranch Hand

Joined: Nov 26, 1999
Posts: 72

Hey Ajay
Try opening a ServerSocket for a port in that m/c.
If an exception is thrown then the port is not free.
I agree. Here's the link:
subject: free port?????
It's not a secret anymore!