aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl/impl/SystemUtil.java.javase
blob: dbb717a32ea795b2751b99e8eb3c8f5f9bf757f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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;
    }
}