Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

ping - IPAddress  RSS feed

 
rama krishnan
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to Ping IPAddress of Multiple Client System

I tried this logic successfully in my local system, but I don't how to Ping others System IPAddress within my System

Please reply Soon
 
Sachindra Pratap
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Make a object of this class , and then through this object call function within this class, in argument giving the ip address you want to ping.
If this ip is reachable it will return true.
 
Evelina Vrabie
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I read a lot of stuff recently about writing a ping program in java and I stumbled upon many answers. I tried the approach above but it didn't work (the answer is here: http://java.sun.com/j2se/1.5.0/docs/api/java/net/InetAddress.html#isReachable(int) ). I also tried this one: http://java.sun.com/j2se/1.5.0/docs/guide/nio/example/Ping.java but without success. My last try was with exec, which worked but that's not a very nice platform independent solution. What are my options for writing a program similar to the one above that actually work? Should I write a program in C and use it in java or there are some thrd. party libraries known?


Thanks a lot.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!