blob: d1e1a70ab739ef0312eeedaf971af1760c74836e [file] [log] [blame]
/**
Start an external application using the Java Runtime exec() method.
Display any output to the standard BeanShell output using print().
Return the process exit code
*/
bsh.help.execcode = "usage: execcode( String arg )";
int execcode( String arg )
{
this.proc = Runtime.getRuntime().exec(arg);
this.din = new DataInputStream( proc.getInputStream() );
while( (line=din.readLine()) != null )
print(line);
return this.proc.exitValue();
}