The following code segment fails in windows, but works under unix:
(note: command = "ls" under unix)
The stack trace is :
C:\CVS_ROOT>
java -classpath Carpenter.jar carpenter.Carpenter
java.io.IOException: CreateProcess: dir error=2
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at carpenter.Carpenter.main(Carpenter.java:17)
I'm developing under Windows.. Can anyone enlighten me as to how I can use this code in a Windows env?