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.
Summary: | [65cat] java.io.IOException: Cannot run program "make" (in directory "C:\Users\Sunbon\Documents\NetBeansProjects\Pi_1"): CreateProcess error=2, The system cannot find the file specified | ||
---|---|---|---|
Product: | cnd | Reporter: | sunbiz <sunbiz> |
Component: | Project | Assignee: | Alexander Simon <alexvsimon> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | gorrus, khalid0111, sunbiz |
Priority: | P2 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
URL: | http://statistics.netbeans.org/exceptions/detail.do?id=119093 | ||
Issue Type: | DEFECT | Exception Reporter: | 119093 |
Bug Depends on: | |||
Bug Blocks: | 149137 | ||
Attachments: |
stacktrace
proposed patch |
Description
sunbiz
2008-09-27 17:32:59 UTC
Created attachment 70724 [details]
stacktrace
The problem is that when we run makefile targets we run hardcoded "make" (see MakeBaseAction). Make utility from the default (or active) toolchain collection should be used instead. should be fixed in 6.5 because on windows make will never be found Similar issues: - when local host is running Solaris and "make" is not available: issue 111811. - when remote host does not have "make" command: issue 148613. *** Issue 148613 has been marked as a duplicate of this issue. *** *** Issue 111811 has been marked as a duplicate of this issue. *** MakeActionProvider.getMakeCommand may be of use Created attachment 70901 [details]
proposed patch
escalated because too many user filed this bug I'm OK with the proposed patch. works for me fixed integrated in main trunk: http://hg.netbeans.org/main/rev/bf538a5b3155 Integrated into 'main-golden', will be available in build *200810011401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/bf538a5b3155 User: Alexander Simon <alexvsimon@netbeans.org> Log: fixing: IZ#148552:65cat] java.io.IOException: Cannot run program "make" (in directory "C:\Users\Sunbon\Documents\NetBeansProjects\Pi_1"): CreateProcess error=2, The system cannot find the file specified Reopening - reproduced in NetBeans IDE Dev (Build 200810210201) http://statistics.netbeans.org/exceptions/detail.do?id=131625 Can not reproduce the issue in NB6.5RC1 Product Version: NetBeans IDE 6.5 RC1 (Build 200810171318) Java: 1.6.0_07; Java HotSpot(TM) Client VM 10.0-b23 System: Windows Vista version 6.0 running on x86; Cp1251; ru_RU (nb) Userdir: C:\Users\ap153252\.netbeans\6.5rc1 I can suggest such scenario: - Delete 'C:/msys/1.0/bin/make' from Tools|Options window - Restart IDE - Open makefile based project - Expend 'Important Files' node - Slect 'Makefile' node. Call context menu. Select 'Make' ==> exception 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>(Unknown Source) at java.lang.ProcessImpl.start(Unknown Source) Caused: java.io.IOException: Cannot run program "" (in directory "C:\test_projects\test_src"): CreateProcess error=2, The system cannot find the file specified at java.lang.ProcessBuilder.start(Unknown Source) 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:235) [catch] at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151) I think that the main issue is an unhandled IOException. Please fix it ASAP. >I think that the main issue is an unhandled IOException. Please fix it ASAP.
It is not true. IOException is handled and shown.
It is real P1?
As a fix I can remove error dialog.
fixed, change set: http://hg.netbeans.org/main/rev/5a06553cddd2 Development: please, review fix. QA: please, verify fix in main trunk. Escalate IZ if it is real show stopper. verified. This is safe and valid as a general solution for processes being run through NativeExecution. Maybe we should introduce some UI to notify user about invalid make for this particular action? (but not in 6.5) I agree with the fix for 6.5 but disagree in general. Exceptions must not be masked. At least a log record should be done. In case of IOException user will see return value -1 and may have no idea why he got it. Integrated into 'main-golden', will be available in build *200810230201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/5a06553cddd2 User: Alexander Simon <alexvsimon@netbeans.org> Log: fixing: IZ#148552:[65cat] java.io.IOException: Cannot run program "make" (in directory "C:\Users\Sunbon\Documents\NetBeansProjects\Pi_1"): CreateProcess error=2, The system cannot find the file specified verified in build 200812080201 |