I'm running Ubuntu Breezy (5.10), and I just installed the libcommons-cli-java package, so that I could take advantage of its argument parsing features.
It installed the file /usr/share/java/commons-cli-1.0.jar and the symlink (to the aforementioned file) /usr/share/java/commons-cli.jar.
Unzipping the jar gets us:
Code:
Archive: commons-cli.jar
creating: META-INF/
inflating: META-INF/MANIFEST.MF
creating: org/
creating: org/apache/
creating: org/apache/commons/
creating: org/apache/commons/cli/
inflating: org/apache/commons/cli/AlreadySelectedException.class
inflating: org/apache/commons/cli/BasicParser.class
inflating: org/apache/commons/cli/CommandLine.class
inflating: org/apache/commons/cli/CommandLineParser.class
inflating: org/apache/commons/cli/GnuParser.class
inflating: org/apache/commons/cli/HelpFormatter$1.class
inflating: org/apache/commons/cli/HelpFormatter$StringBufferComparator.class
inflating: org/apache/commons/cli/HelpFormatter.class
inflating: org/apache/commons/cli/MissingArgumentException.class
inflating: org/apache/commons/cli/MissingOptionException.class
inflating: org/apache/commons/cli/Option.class
inflating: org/apache/commons/cli/OptionBuilder.class
inflating: org/apache/commons/cli/OptionGroup.class
inflating: org/apache/commons/cli/Options.class
inflating: org/apache/commons/cli/ParseException.class
inflating: org/apache/commons/cli/Parser.class
inflating: org/apache/commons/cli/PatternOptionBuilder.class
inflating: org/apache/commons/cli/PosixParser.class
inflating: org/apache/commons/cli/TypeHandler.class
inflating: org/apache/commons/cli/UnrecognizedOptionException.class
So my question is, how do I import this? I've tried
Code:
import org.apache.commons.cli.*
which is how the examples I've seen do it. But the only way I've been able to compile with this, is by unzipping into my working directory.
If someone could tell me where I need to place/rename the jar, any environment variables to set, or anything at all that could help, I would appreciate it.
Thanks,
Chris