public final class Java extends Object
Determines the version of the Java Virtual Machine by checking for the availablity of version specific classes.
Classes are loaded in the following order:
Modifier and Type | Field and Description |
---|---|
static int |
VERSION_1_0 |
static int |
VERSION_1_1 |
static int |
VERSION_1_2 |
static int |
VERSION_1_3 |
static int |
VERSION_1_4 |
static int |
VERSION_1_5 |
static int |
VERSION_1_6 |
static int |
VERSION_1_7 |
Modifier and Type | Method and Description |
---|---|
static int |
getVersion()
Return the version of Java supported by the VM.
|
static boolean |
isCompatible(int version)
Returns true if the current virtual machine is compatible with the given version identifier.
|
static boolean |
isVersion(int version)
Returns true if the given version identifier is equal to the version identifier of the current virtual machine.
|
public static final int VERSION_1_0
public static final int VERSION_1_1
public static final int VERSION_1_2
public static final int VERSION_1_3
public static final int VERSION_1_4
public static final int VERSION_1_5
public static final int VERSION_1_6
public static final int VERSION_1_7
public static int getVersion()
public static boolean isVersion(int version)
version
- The version identifier to check for.public static boolean isCompatible(int version)
version
- The version identifier to check compatibility of.Copyright © 2013 JBoss by Red Hat. All rights reserved.