aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/sun/opengl/impl/SystemUtil.java.javase
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2009-06-15 22:57:38 +0000
committerKenneth Russel <[email protected]>2009-06-15 22:57:38 +0000
commita959c53b7ac91e489bf0959391e892790b9ff248 (patch)
tree4664742a4f9f6daa694364292e376ad2e6ee97d1 /src/jogl/classes/com/sun/opengl/impl/SystemUtil.java.javase
parent506b634b780dcd23aa61015c2ceba3e687196abf (diff)
Copied JOGL_2_SANDBOX r1957 on to trunk; JOGL_2_SANDBOX branch is now closed
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1959 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/jogl/classes/com/sun/opengl/impl/SystemUtil.java.javase')
-rw-r--r--src/jogl/classes/com/sun/opengl/impl/SystemUtil.java.javase18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/jogl/classes/com/sun/opengl/impl/SystemUtil.java.javase b/src/jogl/classes/com/sun/opengl/impl/SystemUtil.java.javase
new file mode 100644
index 000000000..3f201c2b6
--- /dev/null
+++ b/src/jogl/classes/com/sun/opengl/impl/SystemUtil.java.javase
@@ -0,0 +1,18 @@
+package com.sun.opengl.impl;
+
+public class SystemUtil {
+
+ private static volatile boolean getenvSupported = true;
+ /** Wrapper for System.getenv(), which doesn't work on platforms
+ earlier than JDK 5 */
+ public static String getenv(String variableName) {
+ if (getenvSupported) {
+ try {
+ return System.getenv(variableName);
+ } catch (Error e) {
+ getenvSupported = false;
+ }
+ }
+ return null;
+ }
+}