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 87882

Summary: run-single doesn't use command line arguments
Product: projects Reporter: greggwon <greggwon>
Component: Ant ProjectAssignee: Jan Lahoda <jlahoda>
Status: RESOLVED DUPLICATE    
Severity: blocker    
Priority: P3    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description greggwon 2006-10-24 15:59:42 UTC
The run-single target is a simple target without support for the use of the
command line arguments specified in the project settings.  I use run-single to
run one of a handful of tools/classes in my projects which all use the same
particular set of configuration values from the command line etc.  These include
things like -Djava.security.policy -Djava.util.logging.config.file and other
things which really do need to be specified.  I find my self having to make
adjustments for this issue in all of my projects that I allow Netbeans to manage
the ANT generation for.  I believe it should do this itself.  Something like

    <target name="run-single" depends="init,compile-single">
        <fail unless="run.class">Must select one file in the IDE or set
run.class</fail>
        <j2seproject1:java classname="${run.class}">
            <customize>
                <arg line="${application.args}"/>
            </customize>
        </j2seproject1:java>
   </target>

which mirrors the "run" target would be enough, but I also think it should not
compile anything.  By just doing compile-single, the user sees some build
activities, and becomes comfortable that the IDE is taking care of his/her
needs.  But, the user really should have to make sure that the appropriate build
steps have been taken.  Also, not doing the compile makes things faster when I
am just going around making changes and running compile-single with F9 myself
already.
Comment 1 Jesse Glick 2006-10-24 17:26:57 UTC
6.0 M3 has configurations for Java SE projects.

Re. Java system properties: see

http://wiki.netbeans.info/wiki/view/FaqSysPropsDuringRun

Re. avoiding compile on run - you're free to override this in build.xml but I
think the default behavior is correct.

*** This issue has been marked as a duplicate of 49636 ***