Java命令行参数处理类库 Commons CLI

jopen 12年前
     <p>Commons CLI 是一个用来处理命令行参数的 Java 工具包。</p>    <p>Commons CLI 支持各种不同的类型: </p>    <ul>     <li>POSIX like options (ie. <code>tar -zxvf foo.tar.gz</code>)</li>     <li>GNU like long options (ie. <code>du --human-readable --max-depth=1</code>)</li>     <li>Java like properties (ie. <code>java -Djava.awt.headless=true -Djava.net.useSystemProxies=true Foo</code>)</li>     <li>Short options with value attached (ie. <code>gcc -O2 foo.c</code>)</li>     <li>long options with single hyphen (ie. <code>ant -projecthelp</code>)</li>    </ul>    <p>示例代码:</p>    <pre>CommandLineParser parser = new PosixParser(); CommandLine cmd = parser.parse( options, args);</pre>    <p><strong>项目主页:</strong><a href="http://www.open-open.com/lib/view/home/1326766286421" target="_blank">http://www.open-open.com/lib/view/home/1326766286421</a></p>