# JavaVersion

enum JavaVersion(source)

An enumeration of Java versions. Before 9: http://www.oracle.com/technetwork/java/javase/versioning-naming-139433.html 9+: http://openjdk.java.net/jeps/223

## Entries

VERSION_1_1
Link copied to clipboard
VERSION_1_1
VERSION_1_2
Link copied to clipboard
VERSION_1_2
VERSION_1_3
Link copied to clipboard
VERSION_1_3
VERSION_1_4
Link copied to clipboard
VERSION_1_4
VERSION_1_5
Link copied to clipboard
VERSION_1_5
VERSION_1_6
Link copied to clipboard
VERSION_1_6
VERSION_1_7
Link copied to clipboard
VERSION_1_7
VERSION_1_8
Link copied to clipboard
VERSION_1_8
VERSION_1_9
Link copied to clipboard
VERSION_1_9
VERSION_1_10
Link copied to clipboard
VERSION_1_10
VERSION_11
Link copied to clipboard
VERSION_11

Java 11 major version.

VERSION_12
Link copied to clipboard
VERSION_12

Java 12 major version.

VERSION_13
Link copied to clipboard
VERSION_13

Java 13 major version.

VERSION_14
Link copied to clipboard
VERSION_14

Java 14 major version.

VERSION_15
Link copied to clipboard
VERSION_15

Java 15 major version.

VERSION_16
Link copied to clipboard
VERSION_16

Java 16 major version.

VERSION_17
Link copied to clipboard
VERSION_17

Java 17 major version.

VERSION_18
Link copied to clipboard
VERSION_18

Java 18 major version.

VERSION_19
Link copied to clipboard
VERSION_19

Java 19 major version.

VERSION_20
Link copied to clipboard
VERSION_20

Java 20 major version.

VERSION_21
Link copied to clipboard
VERSION_21

Java 21 major version.

VERSION_22
Link copied to clipboard
VERSION_22

Java 22 major version.

VERSION_23
Link copied to clipboard
VERSION_23

Java 23 major version. Not officially supported by Gradle. Use at your own risk.

VERSION_24
Link copied to clipboard
VERSION_24

Java 24 major version. Not officially supported by Gradle. Use at your own risk.

VERSION_25
Link copied to clipboard
VERSION_25

Java 25 major version. Not officially supported by Gradle. Use at your own risk.

VERSION_26
Link copied to clipboard
VERSION_26

Java 26 major version. Not officially supported by Gradle. Use at your own risk.

VERSION_HIGHER
Link copied to clipboard
VERSION_HIGHER

Higher version of Java.

## Functions

current
Link copied to clipboard
open fun current(): JavaVersion
Returns the version of the current JVM.
forClass
Link copied to clipboard
open fun forClass(classData: Array<Byte>): JavaVersion
forClassVersion
Link copied to clipboard
open fun forClassVersion(classVersion: Int): JavaVersion
getMajorVersion
Link copied to clipboard
open fun getMajorVersion(): String
isCompatibleWith
Link copied to clipboard
open fun isCompatibleWith(otherVersion: JavaVersion): Boolean
Returns if this version is compatible with the given version
isJava10
Link copied to clipboard
open fun isJava10(): Boolean
isJava10Compatible
Link copied to clipboard
open fun isJava10Compatible(): Boolean
isJava11
Link copied to clipboard
open fun isJava11(): Boolean
Returns if the version is Java 11.
isJava11Compatible
Link copied to clipboard
open fun isJava11Compatible(): Boolean
Returns if the version is Java 11 compatible.
isJava12
Link copied to clipboard
open fun isJava12(): Boolean
Returns if the version is Java 12.
isJava12Compatible
Link copied to clipboard
open fun isJava12Compatible(): Boolean
Returns if the version is Java 12 compatible.
isJava5
Link copied to clipboard
open fun isJava5(): Boolean
isJava5Compatible
Link copied to clipboard
open fun isJava5Compatible(): Boolean
isJava6
Link copied to clipboard
open fun isJava6(): Boolean
isJava6Compatible
Link copied to clipboard
open fun isJava6Compatible(): Boolean
isJava7
Link copied to clipboard
open fun isJava7(): Boolean
isJava7Compatible
Link copied to clipboard
open fun isJava7Compatible(): Boolean
isJava8
Link copied to clipboard
open fun isJava8(): Boolean
isJava8Compatible
Link copied to clipboard
open fun isJava8Compatible(): Boolean
isJava9
Link copied to clipboard
open fun isJava9(): Boolean
isJava9Compatible
Link copied to clipboard
open fun isJava9Compatible(): Boolean
toString
Link copied to clipboard
open fun toString(): String
toVersion
Link copied to clipboard
open fun toVersion(value: Any): JavaVersion
Converts the given object into a `JavaVersion`.
valueOf
Link copied to clipboard
open fun valueOf(name: String): JavaVersion

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

values
Link copied to clipboard
open fun values(): Array<JavaVersion>

Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants.