开发者

Using Apache SystemUtils Java

开发者 https://www.devze.com 2023-01-15 14:03 出处:网络
I am trying to use the Apache Java library SystemUtils to determine the operating system being used. Here is a link:

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


  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


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>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号