JREInfoProvider

interface JREInfoProvider

Provides information about used Java runtime

Properties

Link copied to clipboard
abstract val version: String

JRE version, i.e. "1.8" or "11"

Link copied to clipboard
abstract val versionAsInt: Int

JRE version as integer, i.e. 8 or 11

Functions

Link copied to clipboard
abstract fun assertVersion(message: String = "JRE version requirements are not satisfied", condition: (Int) -> Boolean)

Does nothing if condition returns true for current JRE version, throws AssertionError otherwise

Link copied to clipboard
abstract fun assertVersionAtLeast(minVersion: Int)

Does nothing if current JRE version is higher or equal than minVersion, throws AssertionError otherwise

Link copied to clipboard
abstract fun assertVersionInRange(minVersion: Int, maxVersion: Int)

Does nothing if current JRE version is between minVersion and maxVersion, throws AssertionError otherwise