@@ -0,0 +1,1297 @@
+package org.lodder.subtools.sublibrary;%0A%0A/**%0A * helper class to check the operating system this Java VM runs in%0A * %0A * please keep the notes below as a pseudo-license%0A * %0A * http://stackoverflow.com/questions/228477/how-do-i-programmatically-determine%0A * -operating-system-in-java compare to%0A * http://svn.terracotta.org/svn/tc/dso/tags%0A * /2.6.4/code/base/common/src/com/tc/util/runtime/Os.java%0A * http://www.docjar.com/html/api/org/apache/commons/lang/SystemUtils.java.html%0A */%0Apublic final class OsCheck %7B%0A%09/**%0A%09 * types of Operating Systems%0A%09 */%0A%09public enum OSType %7B%0A%09%09Windows, MacOS, Linux, Other%0A%09%7D;%0A%0A%09// cached result of OS detection%0A%09protected static OSType detectedOS;%0A%0A%09/**%0A%09 * detect the operating system from the os.name System property and cache%0A%09 * the result%0A%09 * %0A%09 * @returns - the operating system detected%0A%09 */%0A%09public static OSType getOperatingSystemType() %7B%0A%09%09if (detectedOS == null) %7B%0A%09%09%09String OS = System.getProperty(%22os.name%22, %22generic%22).toLowerCase();%0A%09%09%09if ((OS.indexOf(%22mac%22) %3E= 0) %7C%7C (OS.indexOf(%22darwin%22) %3E= 0)) %7B%0A%09%09%09%09detectedOS = OSType.MacOS;%0A%09%09%09%7D else if (OS.indexOf(%22win%22) %3E= 0) %7B%0A%09%09%09%09detectedOS = OSType.Windows;%0A%09%09%09%7D else if (OS.indexOf(%22nux%22) %3E= 0) %7B%0A%09%09%09%09detectedOS = OSType.Linux;%0A%09%09%09%7D else %7B%0A%09%09%09%09detectedOS = OSType.Other;%0A%09%09%09%7D%0A%09%09%7D%0A%09%09return detectedOS;%0A%09%7D%0A%7D%0A

Add helper class to check OS Type