You want to use Commons Lang because your program needs to use some of the simple utilities this component provides, such as array manipulation, date manipulation, and enums.
To use Commons Lang in a Maven 2 project, add the following
dependency to your project's pom.xml
:
Example 1.1. Adding a Dependency on Commons Lang
<dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> <version>2.4</version> </dependency>
If you are not sure what this means, I'd suggest reading Maven: The Definitive
Guide. When you depend on a library in Maven 2, all you need to
do is add the dependency groupId
,
artifactId
, and version
to your
project's dependencies. Once you do this, Maven 2 will download the
dependency and make it available on your project's classpath.