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.
Created attachment 126729 [details] Example RCP Application that uses OptionProcessor to throw CommandException with exit code 0 With 7.2.1, I am seeing behavior that has changed from previous Netbeans platforms (unsure what last platform exhibited expected behavior). With an OptionProcessor, if a CommandException is thrown with exitCode 0, the application would shutdown and return the exit code 0. With 7.2.1, if a CommandException with exit code 0 is thrown, the application shuts down but returns an exitCode of 2. The use cases I am developing for are: -user does not supply commandline flags and GUI application loads -user supplies specific commandline flags, app will process then shut down without loading gui Before 7.2.1, I used exit code 0 with CommandException to signal both "shut down application" and "return code 0". It seems without the ability to use exit code 0 with CommandException, there is no way to make the platform shut down purposefully with a success code. Attached is an example RCP application that uses an OptionProcessor to throw CommandException with exit code 0. project.properties has been modified to use: run.args.extra=--compile test.blue --output test.csd --nosplash --nogui The use of --compile and --output triggers the OptionProcessor correctly.
ergonomics#02ed1b3bc14a
Integrated into 'main-golden', will be available in build *201211030001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/02ed1b3bc14a User: Jaroslav Tulach <jtulach@netbeans.org> Log: #221032: Allow CommandException(0) to terminate the application