An open API service indexing awesome lists of open source software.

https://github.com/harium/os-detector

Lightweight fork of SystemUtils.java from Apache Commons Lang
https://github.com/harium/os-detector

apache-commons detect java os system-utils

Last synced: 4 months ago
JSON representation

Lightweight fork of SystemUtils.java from Apache Commons Lang

Awesome Lists containing this project

README

        

# os-detector
Lightweight fork of SystemUtils.java from Apache Commons Lang

## Maven
```

com.harium.util
os-detector
1.0.0

```

## Usage
Use it as Apache Commons Lang:

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

Or with OSDetector:
```java
if (OS.Linux == OSDetector.getOS()) {
// do something
} else {
// do something
}
```