0

In Windows, using the tracert <host> command gives us the intermediate ip addresses, How to do this in Java, other than using Runtime class ?

cyberpirate92
  • 2,728
  • 2
  • 24
  • 40
  • 1
    You can't. `traceroute` does it with the ICMP protocol, which isn't accessible in standard Java. You would have to use one of the numerous JPcap implementations, wrappers over `libpcap`. – user207421 Aug 06 '14 at 07:53
  • http://stackoverflow.com/questions/2627706/how-to-to-icmps-and-traceroutes-in-java – Wundwin Born Aug 06 '14 at 07:55
  • Or you can call `tracert` or `traceroute` from Java to get it to do the hard work. – Peter Lawrey Aug 06 '14 at 08:29

0 Answers0