ping from Unix script

I have two queries in regard to a Unix script.
1) From a Unix script, I want to read the IP of another remote HP-UX server and want to just check if that machine is reachable or the IP exists. I don't know the login Id and password of the remote machine. I could not properly manage with ping. How can I proceed to do ?
2) I want to see the installed version of Java on the machine where the script will run and check if it is higher than 1.4.2. I did using a bulky code (read the version, cut against the dots and compare one by one). Is there any better/ rugged way to do?
It will be great if someone can give some idea.
Regards
AC

To ping a list of hosts. See the attachment in this thread

Thanks a lot. Actually, I didn't get mail notofication to may email id because of some setting s issue. That's why I did n't check it.
Anyway thanks.