Serializable, Comparable<JRE>@API(status=STABLE,
since="5.1")
public enum JRE
extends Enum<JRE>
If the current JRE version cannot be detected — for example, if the
java.version JVM system property is undefined — then none of
the constants defined in this enum will be considered to be the
current JRE version.
JAVA_8,
JAVA_9,
JAVA_10,
JAVA_11,
JAVA_12,
JAVA_13,
JAVA_14,
OTHER,
EnabledOnJre,
DisabledOnJre| Enum Constant | Description |
|---|---|
JAVA_10 |
Java 10.
|
JAVA_11 |
Java 11.
|
JAVA_12 |
Java 12.
|
JAVA_13 |
Java 13.
|
JAVA_14 |
Java 14.
|
JAVA_8 |
Java 8.
|
JAVA_9 |
Java 9.
|
OTHER |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
isCurrentVersion() |
|
static JRE |
valueOf(String name) |
Returns the enum constant of this type with the specified name.
|
static JRE[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final JRE JAVA_8
public static final JRE JAVA_9
public static final JRE JAVA_10
public static final JRE JAVA_11
@API(status=STABLE,
since="5.4")
public static final JRE JAVA_12
@API(status=STABLE,
since="5.4")
public static final JRE JAVA_13
@API(status=STABLE,
since="5.5")
public static final JRE JAVA_14
public static final JRE OTHER
public static JRE[] values()
for (JRE c : JRE.values()) System.out.println(c);
public static JRE valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic boolean isCurrentVersion()
true if this JRE is known to be the
Java Runtime Environment version for the currently executing JVMCopyright © 2019. All rights reserved.