public class JVM extends Object
Instead of burying a constant like "isQuartz" in its most relevant class (such as OptimizedGraphics2D), it should be stored here so if other classes need to access it they don't necessary have to
| Modifier and Type | Field and Description |
|---|---|
static boolean |
isLinux
Whether this session is on a Linux machine.
|
static boolean |
isMac
Whether this session is on a Mac.
|
static boolean |
isVista
Whether this session is on Vista.
|
static boolean |
isVistaOrWindows7
Whether this session is on Windows Vista or Windows 7.
|
static boolean |
isWindows
Whether this session is on Windows.
|
static boolean |
isWindows7
Whether this session is on Windows 7.
|
static boolean |
isWindowsXP
Whether this session is on Windows XP.
|
static float |
javaVersion
The major Java version being used (1.4, 1.5, 1.6, etc.), or -1 if this value couldn't be correctly determined.
|
static boolean |
usingQuartz
If on a Mac: whether Quartz is the rendering pipeline.
|
| Constructor and Description |
|---|
JVM()
|
| Modifier and Type | Method and Description |
|---|---|
static float |
getMajorJavaVersion()
This converts the system property "java.version" to a float value.
|
static float |
getMajorJavaVersion(boolean catchSecurityException)
|
static String |
getProfile()
Gets basic information about this session's JVM: the OS name & version, the Java version, and (on Mac) whether Quartz is being used.
|
static boolean |
isJNLP()
Check to see if we're in a JNLP session.
|
static void |
printProfile()
Prints basic information about this session's JVM: the OS name & version, the Java version, and (on Mac) whether Quartz is being used.
|
public static final float javaVersion
public static final boolean isMac
public static final boolean isLinux
public static final boolean isWindows
public static final boolean isVista
public static final boolean isWindows7
public static final boolean isWindowsXP
public static final boolean isVistaOrWindows7
public static final boolean usingQuartz
public static boolean isJNLP()
public static void printProfile()
public static StringgetProfile()
public static float getMajorJavaVersion()
throws AccessControlException
AccessControlException - this may be thrown in unsigned applets! Beware!
public static float getMajorJavaVersion(boolean catchSecurityException)
catchSecurityException - if true and an exception occurs, then -1 is returned.