Tag Archives: Apache Commons Lang

Java – Determine if the running OS is Windows, Mac or Linux

The Apache Commons Lang library could help you to determine the running OS type. Here is an simple example.

pom.xml

...
<dependency>
  <groupId>org.apache.commons</groupId>
  <artifactId>commons-lang3</artifactId>
  <version>3.1</version>
</dependency>
...

Continue reading Java – Determine if the running OS is Windows, Mac or Linux