Serializable
, Comparable<JavaRuntime>
public enum JavaRuntime extends Enum<JavaRuntime>
Enum Constant | Description |
---|---|
JAVA_11 |
Java 11 runtime.
|
JAVA_17 |
Java 17 runtime.
|
JAVA_8 |
Java 8 runtime.
|
OTHER |
Other Java runtime.
|
Modifier and Type | Method | Description |
---|---|---|
static JavaRuntime |
current() |
Returns the
JavaRuntime of the currently executing JVM. |
static JavaRuntime |
parse(String version) |
Parses the given version string into a
JavaRuntime . |
static JavaRuntime |
valueOf(String name) |
Returns the enum constant of this type with the specified name.
|
static JavaRuntime[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final JavaRuntime JAVA_8
public static final JavaRuntime JAVA_11
public static final JavaRuntime JAVA_17
public static final JavaRuntime OTHER
public static JavaRuntime[] values()
for (JavaRuntime c : JavaRuntime.values()) System.out.println(c);
public static JavaRuntime 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 null@Nonnull public static JavaRuntime current()
JavaRuntime
of the currently executing JVM.JavaRuntime
of the currently executing JVM.@Nonnull public static JavaRuntime parse(@Nonnull String version)
JavaRuntime
.version
- The version string to parse.JavaRuntime
.