From 4cda4b70dbcd21cf57e1e253ddba32b88bcaec18 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 8 Feb 2011 06:20:35 +0100 Subject: Move implementation private files from com.jogamp..impl. to jogamp. (1/2) - rename task - com.jogamp.opengl.impl -> jogamp.opengl - com.jogamp.opengl.util.glsl.fixedfunc.impl -> jogamp.opengl.util.glsl.fixedfunc - com.jogamp.nativewindow.impl -> jogamp.nativewindow - com.jogamp.newt.impl -> jogamp.newt This sorts implementation details from the top level, ie skipping the public 'com', allowing a better seperation of public classes and implementation details and also reduces strings. This approach of public/private seperation is also used in the OpenJDK. --- src/jogl/classes/jogamp/opengl/SystemUtil.java.javase | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/jogl/classes/jogamp/opengl/SystemUtil.java.javase (limited to 'src/jogl/classes/jogamp/opengl/SystemUtil.java.javase') 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; + } +} -- cgit v1.2.3