This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Sockets and Internet Protocols and the fly likes calculating number of hops Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "calculating number of hops " Watch "calculating number of hops " New topic
Author

calculating number of hops

thomas Fuchs
Greenhorn

Joined: Apr 18, 2007
Posts: 16
Hi,

Does anyone know of how to calculate/figure out
the number of hops to a server
using java ?

for example: I open up a socket to 'x' from 'y'
how many hops is it from x to y ...

thanks
Darrin Cartwright
Ranch Hand

Joined: Dec 27, 2002
Posts: 107
Hi Thomas,

Try exec() with the traceroute command. Something like:


If it has to be "pure" java, I'm afraid I can't help ya.


Life is good on the Ponderosa,<br />but mind where you step.
thomas Fuchs
Greenhorn

Joined: Apr 18, 2007
Posts: 16
Thanks very much
this will work great
much appreciated
 
Consider Paul's rocket mass heater.
 
subject: calculating number of hops