Enum Class JRE

java.lang.Object
java.lang.Enum<JRE>
org.junit.jupiter.api.condition.JRE
All Implemented Interfaces:
Serializable, Comparable<JRE>, Constable

@API(status=STABLE, since="5.1") public enum JRE extends Enum<JRE>
Enumeration of Java Runtime Environment (JRE) versions.

If the current JRE version can be detected but is not one of the predefined constants in this enum, OTHER will be considered to be the current JRE version.

Since:
5.1
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    No longer supported at runtime; please use JAVA_17 or later
    Deprecated, for removal: This API element is subject to removal in a future version.
    No longer supported at runtime; please use JAVA_17 or later
    Deprecated, for removal: This API element is subject to removal in a future version.
    No longer supported at runtime; please use JAVA_17 or later
    Deprecated, for removal: This API element is subject to removal in a future version.
    No longer supported at runtime; please use JAVA_17 or later
    Deprecated, for removal: This API element is subject to removal in a future version.
    No longer supported at runtime; please use JAVA_17 or later
    Deprecated, for removal: This API element is subject to removal in a future version.
    No longer supported at runtime; please use JAVA_17 or later
    Deprecated, for removal: This API element is subject to removal in a future version.
    No longer supported at runtime; please use JAVA_17 or later
    Java 17.
    Java 18.
    Java 19.
    Java 20.
    Java 21.
    Java 22.
    Java 23.
    Java 24.
    Java 25.
    Java 26.
    Deprecated, for removal: This API element is subject to removal in a future version.
    No longer supported at runtime; please use JAVA_17 or later
    Deprecated, for removal: This API element is subject to removal in a future version.
    No longer supported at runtime; please use JAVA_17 or later
    An undefined JRE version.
  • Method Summary

    Modifier and Type
    Method
    Description
    static JRE
    Returns the JRE for the currently executing JVM, potentially OTHER.
    static JRE
    Deprecated.
    in favor of currentJre()
    static int
    Returns the version number for the currently executing JVM, or -1 if the current JVM version could not be determined.
    boolean
    Returns true if this JRE is known to be the Java Runtime Environment version for the currently executing JVM or if the version is OTHER.
    static boolean
    isCurrentVersion(int version)
    Returns true if the supplied version number is known to be the Java Runtime Environment version for the currently executing JVM or if the supplied version number is -1 and the current JVM version could not be determined.
    static JRE
    Returns the enum constant of this class with the specified name.
    static JRE[]
    Returns an array containing the constants of this enum class, in the order they are declared.
    int
    Get the version of this JRE.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait