Click to See Complete Forum and Search --> : Simple..yet so...


July 26th, 1999, 12:41 AM
This is how i'm trying to execute a commandline from my java program..
import java.io.*;
public class MyRuntime{
static public void main(String[] args)
{

String command = new String(/*some command*/);
try{
Runtime robject=Runtime.getRuntime();
robject.exec(command);
} catch(Exception ioe)
{
System.out.println("exception here "+ioe);
}
}
}
but, it throws an exception saying..
IOException : CreateProcess:/*comand name*/ error=2
Can u help me out?
Thanx.