wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes how i do this? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "how i do this?" Watch "how i do this?" New topic
Author

how i do this?

Mandar Khire
Ranch Hand

Joined: Sep 11, 2007
Posts: 492

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.


Millions saw the apple fall, but Newton asked why.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19651
    
  18

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.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37950
    
  22
Please don't use thread titles like "how I do this?" Please use a title which tells people what the thread is about.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how i do this?
 
Similar Threads
MQJMS2005: failed to create MQQueueManager for 'WAS_localhost_server1'
Can someone plz check it
Problem with ClassCastException
Sending SMS from a servlet
Check the connectivity from one host IP to another IP