aspose file tools*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 485
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.
If you understand, say "understand". If you don't understand, say "don't understand". But if you understand and say "don't understand". How do I understand that you understand? Understand!
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19541
    
  16

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: 36468
    
  16
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
Problem with ClassCastException
Can someone plz check it
Sending SMS from a servlet
Check the connectivity from one host IP to another IP
MQJMS2005: failed to create MQQueueManager for 'WAS_localhost_server1'