Harium / os-detector

Lightweight fork of SystemUtils.java from Apache Commons Lang

Repository from Github https://github.comHarium/os-detectorRepository from Github https://github.comHarium/os-detector

os-detector

Lightweight fork of SystemUtils.java from Apache Commons Lang

Maven

<dependency>
    <groupId>com.harium.util</groupId>
    <artifactId>os-detector</artifactId>
    <version>1.0.0</version>
</dependency>

Usage

Use it as Apache Commons Lang:

if (SystemUtils.IS_OS_WINDOWS) {
    // do something
} else {
    // do something
}

Or with OSDetector:

if (OS.Linux == OSDetector.getOS()) {
    // do something
} else {
    // do something
}

About

Lightweight fork of SystemUtils.java from Apache Commons Lang


Languages

Language:Java 100.0%