summaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/common/os
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-10-14 21:30:14 +0200
committerSven Gothel <[email protected]>2010-10-14 21:30:14 +0200
commit1c7f8f8dafe0252afbb0e2701687210814b56793 (patch)
tree99e9830d5b57ab55fc109f30f9196dff6131b810 /src/java/com/jogamp/common/os
parent52dcea28906b3e61ef44595399e525dd5169c014 (diff)
Moved locking to: com.jogamp.common.util.locks ; Better abstraction ; Misc changes
Diffstat (limited to 'src/java/com/jogamp/common/os')
-rw-r--r--src/java/com/jogamp/common/os/Platform.java48
1 files changed, 47 insertions, 1 deletions
diff --git a/src/java/com/jogamp/common/os/Platform.java b/src/java/com/jogamp/common/os/Platform.java
index 2b59d64..aac72af 100644
--- a/src/java/com/jogamp/common/os/Platform.java
+++ b/src/java/com/jogamp/common/os/Platform.java
@@ -48,7 +48,12 @@ public class Platform {
public static final boolean JAVA_SE;
public static final boolean LITTLE_ENDIAN;
public static final String OS;
+ public static final String OS_VERSION;
public static final String ARCH;
+ public static final String JAVA_VENDOR;
+ public static final String JAVA_VENDOR_URL;
+ public static final String JAVA_VERSION;
+ public static final String NEWLINE;
private static final boolean is32Bit;
private static final int pointerSizeInBits;
@@ -60,7 +65,12 @@ public class Platform {
// here as these system properties are visible even to unsigned
// applets
OS = System.getProperty("os.name");
+ OS_VERSION = System.getProperty("os.version");
ARCH = System.getProperty("os.arch");
+ JAVA_VENDOR = System.getProperty("java.vendor");
+ JAVA_VENDOR_URL = System.getProperty("java.vendor.url");
+ JAVA_VERSION = System.getProperty("java.version");
+ NEWLINE = System.getProperty("line.separator");
pointerSizeInBits = getPointerSizeInBitsImpl();
is32Bit = initArch();
@@ -119,7 +129,7 @@ public class Platform {
}
// probe for classes we need on a SE environment
- try{
+ try {
Class.forName("java.nio.LongBuffer");
Class.forName("java.nio.DoubleBuffer");
return true;
@@ -163,6 +173,14 @@ public class Platform {
}
/**
+ * Returns the OS version.
+ */
+ public static String getOSVersion() {
+ return OS_VERSION;
+ }
+
+
+ /**
* Returns the CPU architecture String.
*/
public static String getArch() {
@@ -170,6 +188,34 @@ public class Platform {
}
/**
+ * Returns the JAVA vendor
+ */
+ public static String getJavaVendor() {
+ return JAVA_VENDOR;
+ }
+
+ /**
+ * Returns the JAVA vendor url
+ */
+ public static String getJavaVendorURL() {
+ return JAVA_VENDOR_URL;
+ }
+
+ /**
+ * Returns the JAVA vendor
+ */
+ public static String getJavaVersion() {
+ return JAVA_VERSION;
+ }
+
+ /**
+ * Returns the JAVA vendor
+ */
+ public static String getNewline() {
+ return NEWLINE;
+ }
+
+ /**
* Returns true if this JVM is a 32bit JVM.
*/
public static boolean is32Bit() {