This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how i do this?

 
Mandar Khire
Ranch Hand
Posts: 569
Android Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use windows XP.Every time i start my computer, i run 1 command that is:-
ping xxx.xxx.xxx.xxx -t
so i check network connectivity between my computer to default Gateway.
I want to create java program which i run & check same connectivity.
Can i do this?Is it possible? Any hint, so link so i read related topic & try to do this.
I try to search but i didn't get.
 
Rob Spoor
Sheriff
Pie
Posts: 20550
57
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're in luck - support for this has been added in Java 5.0

Check out java.net.InetAddress, it has a method called "isReachable" which takes a timeout; there is also an overloaded version that takes a NetworkInterface and ttl value as well.
 
Campbell Ritchie
Sheriff
Pie
Posts: 49432
62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please don't use thread titles like "how I do this?" Please use a title which tells people what the thread is about.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic