diff options
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; + } +} |