File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "how i do this?" Watch "how i do this?" New topic

how i do this?

Mandar Khire
Ranch Hand

Joined: Sep 11, 2007
Posts: 557

I use windows XP.Every time i start my computer, i run 1 command that is:-
ping -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

Joined: Oct 27, 2005
Posts: 20279

You're in luck - support for this has been added in Java 5.0

Check out, 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.

How To Ask Questions How To Answer Questions
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 46437
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:
subject: how i do this?
It's not a secret anymore!