aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/SystemUtil.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-02-09 06:30:52 +0100
committerSven Gothel <[email protected]>2011-02-09 06:30:52 +0100
commitfbb775c52b210dd104d58f722c5d76bb570f1def (patch)
treea6b57a58ab628865d7485c4289459077083fbf33 /src/jogl/classes/jogamp/opengl/SystemUtil.java
parentcee947c7c32fbf7175db7a080c76634056d982b2 (diff)
Remove CDC
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/SystemUtil.java')
-rw-r--r--src/jogl/classes/jogamp/opengl/SystemUtil.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/jogl/classes/jogamp/opengl/SystemUtil.java b/src/jogl/classes/jogamp/opengl/SystemUtil.java
new file mode 100644
index 000000000..befe1a315
--- /dev/null
+++ b/src/jogl/classes/jogamp/opengl/SystemUtil.java
@@ -0,0 +1,18 @@
+package jogamp.opengl;
+
+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;
+ }
+}