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.

Bug 267483 - Launchers: "${OUTPUT_PATH} > file" command doesn't work on Windows
Summary: Launchers: "${OUTPUT_PATH} > file" command doesn't work on Windows
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: execution (show other bugs)
Version: 8.2
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: ilia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-08 13:03 UTC by soldatov
Modified: 2017-07-20 17:50 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description soldatov 2016-08-08 13:03:15 UTC
Scenario:
- Create Welcome project
- Open Project Properties window
- Select Launchers category
- Press New button
- Set Run Command = "${OUTPUT_PATH}"
- Press OK
==> "C:\Users\user\Documents\NetBeansProjects\Welcome_1\dist\Debug\Cygwin-Windows\welcome_1 does not exist or is not a executable" window appears
Comment 1 soldatov 2016-08-08 13:07:06 UTC
Also I see exception in messages.log:

[catch] at org.netbeans.modules.cnd.utils.CndUtils.assertTrueInConsole(CndUtils.java:222)
	at org.netbeans.modules.cnd.utils.CndUtils.assertTrueInConsole(CndUtils.java:287)
	at org.netbeans.modules.cnd.makeproject.api.ProjectActionEvent.getExecutable(ProjectActionEvent.java:199)
	at org.netbeans.modules.cnd.makeproject.api.ProjectActionSupport$EventsProcessorImpl.checkExecutable(ProjectActionSupport.java:652)
	at org.netbeans.modules.cnd.makeproject.api.ProjectActionSupport$EventsProcessorImpl.run(ProjectActionSupport.java:433)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443)
	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)
	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2058)
Comment 2 soldatov 2016-08-08 14:07:45 UTC
1st scenario is not a valid. I forgot to build project. My real problem in tests on Windows:
- Create Welcome project
- Open Project Properties window
- Select Launchers category
- Press New button
- Set Run Command = ${OUTPUT_PATH} > 111.txt
- Build project
- Push Run|launcher1000 menu item
==> On Solaris/Linux I see new 111.txt file. On Windows I see:
Welcome...

Arguments:
1: >
2: 111.txt

RUN LAUNCHER1000 SUCCESSFUL (total time: 57ms)
Comment 3 ilia 2017-06-22 13:22:37 UTC
Launcher 1:
  "${PROJECT_DIR}/${OUTPUT_PATH}" > 111.txt
Launcher 2:
  "${PROJECT_DIR}/${OUTPUT_PATH} 1 2 hello"
Launcher 3:
  "${PROJECT_DIR}/${OUTPUT_PATH}" 1 2 hello

Launcher 1:
  Linux: redirects all output to 111.txt
  Windows: Welcome... 
           Arguments:
           1: >
           2: 111.txt
Launcher 2:
  Linux: /home/ilia/<...>/welcome_43 1 2 hello does not exist or is not an executable
  Windows: C:\Windows\<...>\welcome_5 1 2 hello does not exist or is not an executable
Launcher 3:
  Linux: Welcome...
         Arguments:
         1: 1
         2: 2
         3: hello
  Win:   Welcome ...
         Arguments:
         1: 1
         2: 2
         3: hello
Comment 4 ilia 2017-06-22 16:29:24 UTC
b/dlight.nativeexecution/src/org/netbeans/modules/nativeexecution/NativeProcessInfo.java

setCommandLine method

it seems its safe to remove 
 if (isWindows && commandLine != null)  branch
Comment 5 Quality Engineering 2017-07-20 17:50:47 UTC
Integrated into 'main-silver', will be available in build *201707201608* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/5c5c0ffff99a
User: Ilia Gromov <ilia@netbeans.org>
Log: Fixed #267483 - Launchers: "${OUTPUT_PATH} > file" command doesn't work on Windows