Luke Gorrie <>
Mon Feb 7 16:37:02 CET 2005

leo lencioni <> writes:

> So for my first try to this I will write a small java program that
> will execute a isReachable method . Communications between erlang and
> Java program will be based on standard tcp sockets.

Yikes! Maybe we took your question too literally. What is it you want
to do and why, in high-level terms?

NB: if you do decide to use a helper you could do it more lightweight
than Java, e.g. on GNU:


  reachable(Host) ->
      os:cmd("ping -c 1 "++Host++" &>/dev/null; echo $?") == "0\n".

used like this:

  1> test:reachable("localhost").
  2> test:reachable("www.google.com").
  3> test:reachable("").       

More information about the erlang-questions mailing list