FPing using JDK
HI,
I want to write a program that will fping a list of machines.Can any one give me some idea as how to use JDK write a FPing programe.
Thanks
[152 byte] By [
htsrinivas] at [2007-11-11 10:02:36]

# 1 Re: FPing using JDK
If you are using jdk 1.5, you can use the method, InetAddress.isReachable(timeInMillisecond) method. But if you are running on unix based system, you have to run java as root.
If you are using older versions of jdk which is less than 1.5, you have to write your own multi threaded implementation of Fping.
We have created a socket and set the timeout for a small amount of time,using setSoTimeout() method and call setTcpNoDelay(false) method. After that we tried to connect to the Socket. If an exception araises, we identified that the host is not reachable.
I don't know, how good is this approach.But that application is working fine..
-Sudhi