• Post Reply Bookmark Topic Watch Topic
  • New Topic

again: check a TCP port's state

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i was a bit too fast when i thought that i got it:
how can i check whether or not a tcp port is currently in use or not ? i found java.net.SocketPermission, but is it the right class and if it is, how do i use it ?
 
Jim Bertorelli
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try opening a socket on that port and if you get an exception, the port is in use
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!