diff options
author | Sven Gothel <[email protected]> | 2011-02-09 06:30:52 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-02-09 06:30:52 +0100 |
commit | fbb775c52b210dd104d58f722c5d76bb570f1def (patch) | |
tree | a6b57a58ab628865d7485c4289459077083fbf33 /src/jogl/classes/jogamp/opengl/SystemUtil.java | |
parent | cee947c7c32fbf7175db7a080c76634056d982b2 (diff) |
Remove CDC
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/SystemUtil.java')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/SystemUtil.java | 18 |
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; + } +} |