This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes How to invoke the os's ping Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to invoke the os Watch "How to invoke the os New topic
Author

How to invoke the os's ping

Qunfeng Wang
Ranch Hand

Joined: Jan 28, 2005
Posts: 430
First I get the OS using properties.Then I want to invoke ping base on the OS I got.How to do it?
Some API?


To be or not to be. It's a question.
Qunfeng Wang
Ranch Hand

Joined: Jan 28, 2005
Posts: 430
Yeah!
I've got it.It's Runtime!
Now another question.When I want to invoke telnet,not like the ping ,I can achive that like this Runtime.getRuntime().exec("cmd.exe /c start ping 192.168.1.1").For the telnet,first telnet,then input username, pwd.How to do this?I got the username pwd from my GUI.
Bonagiri UmaMaheshwar Rao
Greenhorn

Joined: Mar 27, 2005
Posts: 12
you might try be getting the Process OutputStream and writing the username and password to the stream.
I am not sure whether it works or not.
 
Don't get me started about those stupid light bulbs.
 
subject: How to invoke the os's ping
 
Similar Threads
test
PING program
linux or windows
Design pattern for sorting nested arraylists
Ping ?