Valhalla Legends Forums Archive | Java Programming | Issuing console commands

AuthorMessageTime
hismajesty
How would I go about issuing commands to a console, such as ping google.com? I know the Windows APIs allow Shell(), but I'm looking more towards using this particular thing on a Linux machine. Thanks.
August 25, 2004, 2:27 AM
Orillion
Look at using Runtime.exec(). It returns a Process object that allows you to access all the various streams for the command yourve executed.
August 25, 2004, 3:51 AM
hismajesty
Alright.

Also, I don't really need to know anymore. I wanted to add a .update command to JavaOp so I could update the bot running in our channel when I make changes and iago is afk. But he gave me permission to access the script through my shell, so I can use that. :)
August 25, 2004, 4:29 AM
iago
And I'm having issues with the script. Pretty soon I'm just going to make a javaop account and give everybody the password >:(

August 26, 2004, 6:05 AM

Search