exec
- From: "Jean Pierre Daviau" <Once@xxxxxxxxxx>
- Date: Sun, 22 Apr 2007 15:35:04 -0400
Hi everyone,
I can get this working:
Process p = null;
Runtime r = Runtime.getRuntime();
p = r.exec("EmailMoi.bat");
p.waitFor();
------ EmailMoi.bat"); ----
set >>Email_moi_back.txt
tree.com C:\\ >>Email_moi_back.txt
------
java.io.IOException: CreateProcess: EmailMoi.bat error=2
at java.lang.Win32Process.<init>(Compiled Code)
at java.lang.Runtime.exec(Compiled Code)
at java.lang.Runtime.exec(Runtime.java:122)
at Property.getEnvVars(Compiled Code)
at Property.main(Compiled Code)
--
p = r.exec("cmd.exe /c EmailMoi.bat");
runs without complain but the result are not printed to the file.
Thanks for your attention.
Jean Pierre Daviau
--
windows Xp
asus p4 s533/333/133
Intel(R) Celeron (R) CPU 2.00 GHz
Processor Radeon7000 0x5159 agp
.
- Follow-Ups:
- Re: exec
- From: Jean Pierre Daviau
- Re: exec
- Prev by Date: Random Price/Currency Value Generator
- Next by Date: Re: Java Exam Question
- Previous by thread: Random Price/Currency Value Generator
- Next by thread: Re: exec
- Index(es):
Relevant Pages
|