File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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
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: 504

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: 19761
    
  20

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: 39834
    
  28
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?