Hi,
I have developed an application in swings in which a user will schedule a command. So to make it user friendly the user will enter only the command, like the "del d:\exp.txt". I am successful in all other parts of the program but when i try to run the command from
java i get the error. The code is below some one guide me through it please.
When i try to run the commands like the java or the task list i get the out put. But the command which i have written in the exec method gives error why so. the error is
java.io.IOException: Cannot run program "del": CreateProcess error=2, The system
cannot find the file specified
java.io.IOException: Cannot run program "del": CreateProcess error=2, The system
cannot find the file specified
at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
at java.lang.Runtime.exec(Runtime.java:593)
at java.lang.Runtime.exec(Runtime.java:431)
at java.lang.Runtime.exec(Runtime.java:328)
at comm.main(comm.java:12)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find th
e file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
at java.lang.ProcessImpl.start(ProcessImpl.java:30)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
... 4 more
Press any key to continue...
Thanks & Regards
alexander