commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Bourg (JIRA)" <j...@apache.org>
Subject [jira] Created: (CLI-167) Support options like Java memory settings (-Xmx512M)
Date Wed, 30 Jul 2008 16:23:31 GMT
Support options like Java memory settings (-Xmx512M)
----------------------------------------------------

                 Key: CLI-167
                 URL: https://issues.apache.org/jira/browse/CLI-167
             Project: Commons CLI
          Issue Type: Improvement
          Components: Parser
            Reporter: Emmanuel Bourg
            Priority: Minor
             Fix For: 1.3


This is a RFE to implement the java memory setting style of option, that is a single hyphen
with a long option name and a value immediately after.

For example: -Xmx512M

{code}
public void testJavaMemorySettings() throws Exception {
    Options options = new Options();
    options.addOption(OptionBuilder.withLongOpt("Xmx").create("Xmx"));

    Parser parser = new GnuParser();
    CommandLine cl = parser.parse(options, new  String[] { "-Xmx512M" });

    assertTrue(cl.hasOption("Xmx"));
    assertEquals("512M", cl.getOptionValue("Xmx"));
}
{code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message