 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Name Guest
|
Posted: Sun Feb 04, 2007 12:40 am Post subject: Running BAT/CMD files from java |
|
|
Hello,
I can't seem to execute a batch file from Java.
Runttime.getRuntime().exec("cmd.exe /c c:\\junk.cmd");
"cmd/c junk.cmd" works from the command line, but the above doesn't work
from java. I've even placed quotes around "c:\\junk.cmd" and used the full
path name to cmd.exe. Nothing seems to work.
NOTE: The junk.cmd file is a test batch file that deletes a file to detect
if the file has been executed and can execute binaries like notepad.
Any help appreciated |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|