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 243777 - Command line processor doesn't handle short options correctly
Summary: Command line processor doesn't handle short options correctly
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: Launchers&CLI (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Libor Fischmeistr
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-11 19:11 UTC by mccorb
Modified: 2014-05-09 08:15 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 mccorb 2014-04-11 19:11:12 UTC
Product Version = NetBeans IDE 7.4 (Build 201310111528)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.7.0_45
Runtime = Java HotSpot(TM) 64-Bit Server VM 24.45-b08


I have a CommandLineProcessor class that extends import org.netbeans.spi.sendopts.OptionProcessor so that I can have my own command line options.

one of the options I need to process looks like so...
        RmiPortOpt = org.netbeans.spi.sendopts.Option.shortDescription(Option.requiredArgument('p', "rmiPort"), "CommandLineProcessor-option-rmiPort-shortdescription",  "CommandLineProcessor-option-rmiPort-shortdescription");

if, on the command line I put in --rmiPort=10101 everything works fine. If I put in the short version, e.g. -p=10101 the args[0] for the command is '=10101' instead of '10101'. I have to use 1 dash for the short option and 2 dashes for the long option and I am doing that.