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

Summary: Command line processor doesn't handle short options correctly
Product: platform Reporter: mccorb
Component: Launchers&CLIAssignee: Libor Fischmeistr <lfischmeistr>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 7.4   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:

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.