> commands[0]="cmd.exe";
> commands[1]="cd C:\\Documents and Settings\\ASUS\\Desktop";
> commands[2]="java -jar des.jar";
The command array you pass to Runtime.exec() should hold exactly *one*
command, not a series of them.
If you want to run the command from a specific directory, there is a
version of Runtime.exec() that lets you specify a working directory.
/gordon
--
micro - 18 Apr 2007 07:30 GMT
> The command array you pass to Runtime.exec() should hold exactly *one*
> command, not a series of them.
[quoted text clipped - 5 lines]
>
> --
thank a lot for your valuable help.
solved
Process p=Runtime.getRuntime().exec("java -jar des.jar",null,new
File("C:\\Documents and Settings\\ASUS\\Desktop"));