summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-10-26 12:52:09 +0200
committerSven Gothel <[email protected]>2011-10-26 12:52:09 +0200
commitfa5969168440a01fab814df78a3d23d10c27f72d (patch)
tree8c8eabc041cf95415d25250540a0ac2796c181f9 /src
parenta19f98767da194ba468f53f56c2dcdb9d1d34ac8 (diff)
Platform: Add OS_VERSION_NUMBER / getOSVersionNumber()
Diffstat (limited to 'src')
-rw-r--r--src/java/com/jogamp/common/os/Platform.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/java/com/jogamp/common/os/Platform.java b/src/java/com/jogamp/common/os/Platform.java
index 8d93991..27d556c 100644
--- a/src/java/com/jogamp/common/os/Platform.java
+++ b/src/java/com/jogamp/common/os/Platform.java
@@ -39,6 +39,7 @@ import java.util.jar.JarFile;
import com.jogamp.common.nio.Buffers;
import com.jogamp.common.util.JarUtil;
+import com.jogamp.common.util.VersionNumber;
import com.jogamp.common.util.cache.TempJarCache;
import jogamp.common.Debug;
@@ -63,6 +64,7 @@ public class Platform {
public static final String OS;
public static final String OS_lower;
public static final String OS_VERSION;
+ public static final VersionNumber OS_VERSION_NUMBER;
public static final String ARCH;
public static final String ARCH_lower;
public static final String JAVA_VENDOR;
@@ -152,6 +154,7 @@ public class Platform {
OS = System.getProperty("os.name");
OS_lower = OS.toLowerCase();
OS_VERSION = System.getProperty("os.version");
+ OS_VERSION_NUMBER = new VersionNumber(OS_VERSION, ".");
ARCH = System.getProperty("os.arch");
ARCH_lower = ARCH.toLowerCase();
JAVA_VENDOR = System.getProperty("java.vendor");
@@ -343,7 +346,7 @@ public class Platform {
public static String getOSName() {
return OS;
}
-
+
/**
* Returns the OS version.
*/
@@ -351,6 +354,12 @@ public class Platform {
return OS_VERSION;
}
+ /**
+ * Returns the OS version number.
+ */
+ public static VersionNumber getOSVersionNumber() {
+ return OS_VERSION_NUMBER;
+ }
/**
* Returns the CPU architecture String.