P
Prabh
Hello all,
I'm trying to run a cmd from WINXP from Runtime.exec.
I'm trying to open a file, "a.txt" in notepad.
The run fails with error:
"java.io.IOException: CreateProcess: "notepad a.txt" error=2"
The command used: "notepad a.txt"
The setup of the command I know is fine, because a command, "notepad"
alone works fine and brings up a notepad. Its when I pass some
arguments to notepad that it fails.
I tried quite a few permutations of the command:
notepad a.txt
notepad\ a\.txt
notepad\ a.txt
"notepad a.txt"
'notepad a.txt'
You get the general idea, but it doesnt work in any of these cases and
bombs.
A plain-vanilla notepad works fine.
Could someone please tell me what I'm doing wrong.
Thanks for your time,
Prab
I'm trying to run a cmd from WINXP from Runtime.exec.
I'm trying to open a file, "a.txt" in notepad.
The run fails with error:
"java.io.IOException: CreateProcess: "notepad a.txt" error=2"
The command used: "notepad a.txt"
The setup of the command I know is fine, because a command, "notepad"
alone works fine and brings up a notepad. Its when I pass some
arguments to notepad that it fails.
I tried quite a few permutations of the command:
notepad a.txt
notepad\ a\.txt
notepad\ a.txt
"notepad a.txt"
'notepad a.txt'
You get the general idea, but it doesnt work in any of these cases and
bombs.
A plain-vanilla notepad works fine.
Could someone please tell me what I'm doing wrong.
Thanks for your time,
Prab