OS Detector


License

License

GroupId

GroupId

com.harium.util
ArtifactId

ArtifactId

os-detector
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

OS Detector
OS Detector
Project URL

Project URL

http://github.com/harium/os-detector
Source Code Management

Source Code Management

http://github.com/harium/os-detector/tree/master

Download os-detector

How to add to project

<!-- https://jarcasting.com/artifacts/com.harium.util/os-detector/ -->
<dependency>
    <groupId>com.harium.util</groupId>
    <artifactId>os-detector</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.harium.util/os-detector/
implementation 'com.harium.util:os-detector:1.0.0'
// https://jarcasting.com/artifacts/com.harium.util/os-detector/
implementation ("com.harium.util:os-detector:1.0.0")
'com.harium.util:os-detector:jar:1.0.0'
<dependency org="com.harium.util" name="os-detector" rev="1.0.0">
  <artifact name="os-detector" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.harium.util', module='os-detector', version='1.0.0')
)
libraryDependencies += "com.harium.util" % "os-detector" % "1.0.0"
[com.harium.util/os-detector "1.0.0"]

Dependencies

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

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
}
com.harium.util

Harium

Versions

Version
1.0.0