• Welcome to Valhalla Legends Archive.
 

Issuing console commands

Started by hismajesty, August 24, 2004, 09:27 PM

Previous topic - Next topic

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.

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.

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. :)

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 >:(

This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*