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
- Host: GitHub
- URL: https://github.com/harium/os-detector
- Owner: Harium
- Created: 2019-01-23T15:17:46.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-23T15:32:45.000Z (over 6 years ago)
- Last Synced: 2025-01-24T14:14:38.075Z (5 months ago)
- Topics: apache-commons, detect, java, os, system-utils
- Language: Java
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
}
```