I am trying to use the Apache Java library SystemUtils to determine the operating system being used. Here is a link:
https://commons.apache.org/proper/commons-lang/download_lang.cgi
I am using netbeans to create my application. I can not figure out how to use the library. I have tried importing it but it does not seem to be installed. I have tried finding a download and adding that but I am unable to find one.
Could someone please give me 开发者_运维百科some advice on how to get this library working using netbeans?
Cheers
Eef
Download the commons-lang-2.5-bin.zip
Extract it, and find the
commons-lang-2.5.jar
Add that jar to the classpath of your project by:
right click your project > Properties > Libraries > Add Jar/Folder
Instructions for Netbeans 6.7. It should not be too different in other versions.
- Select your project
- Open Run > Set Project Configuration > Customize...
- In Categories, select Libraries
- In the Compile tab, click on Add JAR/Folder...
- Select the commons-lang JAR.
If you are using Maven, just include the commons-lang dependency in the <dependencies>
section of your pom.xml
:
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.4</version>
</dependency>
精彩评论