Surely, if a ping is sufficient, you can do that with java.net classes and do not need the expense of starting up a whole separate process to run the "ping" command. Also, using pure Java will be fully portable.
However, I suspect that the original poster wants more information than a simple ping can give. If so, then it does sound like platform-specific code is needed. This can be implemented by firing up a separate process to run a platform-specific command, or by using JNI. The former is easy but slow, while the latter is harder to program but much faster.
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
One can check whether the machine is up or down, but not whether it is locked or loggedoff. More over the information you get from the machine totally depends on the O/S on which it is running. If it is running windows, you can get much information.
Advantage with java is you can use Raw Sockets with simple coding, unlike other languages.