aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/SystemUtil.java.javase
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/SystemUtil.java.javase')
-rw-r--r--src/jogl/classes/jogamp/opengl/SystemUtil.java.javase18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/jogl/classes/jogamp/opengl/SystemUtil.java.javase b/src/jogl/classes/jogamp/opengl/SystemUtil.java.javase
new file mode 100644
index 000000000..dbb717a32
--- /dev/null
+++ b/src/jogl/classes/jogamp/opengl/SystemUtil.java.javase
@@ -0,0 +1,18 @@
+package com.jogamp.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;
+ }
+}