0

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

BullyWiiPlaza
  • 17,329
  • 10
  • 113
  • 185
RailsSon
  • 19,897
  • 31
  • 82
  • 105

2 Answers2

5
  1. Download the commons-lang-2.5-bin.zip

  2. Extract it, and find the commons-lang-2.5.jar

  3. Add that jar to the classpath of your project by:

    right click your project > Properties > Libraries > Add Jar/Folder

Community
  • 1
  • 1
Bozho
  • 588,226
  • 146
  • 1,060
  • 1,140
1

Instructions for Netbeans 6.7. It should not be too different in other versions.

  1. Select your project
  2. Open Run > Set Project Configuration > Customize...
  3. In Categories, select Libraries
  4. In the Compile tab, click on Add JAR/Folder...
  5. 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>
gpeche
  • 21,974
  • 5
  • 38
  • 51