This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I cann't launch any project(sample) on Windows XP. java.io.IOException: CreateProcess error=2, The system cannot find the 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) Caused: java.io.IOException: Cannot run program "start" (in directory "D:\tmp\Welcome_2"): CreateProcess error=2, The system cannot find the file specified at java.lang.ProcessBuilder.start(ProcessBuilder.java:459) at org.netbeans.modules.cnd.execution.LocalNativeExecution.exec(LocalNativeExecution.java:184) at org.netbeans.modules.cnd.execution.LocalNativeExecution.executeCommand(LocalNativeExecution.java:112) at org.netbeans.modules.cnd.api.execution.NativeExecutor.run(NativeExecutor.java:257) [catch] at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151)
The reason are latest changes to LocalNativeExecutor: ProcessBuilder can't run Windows "start" commands because there is no associated executable. N.B.: For some reason "Output Window" mode doesn't work too, which can be another issue.
Command "start args" equals "cmd.exe /c start args".
So following hack in LocalNativeExecution.exec() works: -------------------------- // copy the call string String[] call= null; if (processName.equals("start")) { call = new String[args.length + 3]; call[0] = "cmd.exe"; call[1] = "/c"; call[2] = "start"; System.arraycopy(args, 0, call, 3, args.length); } else { call = new String[args.length + 1]; call[0] = processName; System.arraycopy(args, 0, call, 1, args.length); } --------------------------
I removed stdouterr.sh and .bat scripts from the run process, that's why we can no longer execute cmd and shell commands.
external terminal fixed in: http://hg.netbeans.org/main/rev/792878bd2414 however the problem with output window still remains. On windows we do not know the full name of the executable (with .exe)
fixed with the changesets: http://hg.netbeans.org/main/rev/792878bd2414 http://hg.netbeans.org/main/rev/7fde204f35be
Verified in build 20080924