wood burning stoves 2.0
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 Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "calculating number of hops " Watch "calculating number of hops " New topic

calculating number of hops

thomas Fuchs

Joined: Apr 18, 2007
Posts: 16

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 ...

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

Joined: Apr 18, 2007
Posts: 16
Thanks very much
this will work great
much appreciated
I agree. Here's the link: http://aspose.com/file-tools
subject: calculating number of hops
It's not a secret anymore!