Package jenkins.util.java
Class JavaUtils
java.lang.Object
jenkins.util.java.JavaUtils
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public class JavaUtils
extends Object
Utility class for Java environment management and checks.
- Author:
- Oleg Nenashev
-
Method Details
-
getCurrentJavaRuntimeVersionNumber
public static io.jenkins.lib.versionnumber.JavaSpecificationVersion getCurrentJavaRuntimeVersionNumber()Returns the JVM's current version as aVersionNumber
instance. -
getCurrentRuntimeJavaVersion
Returns the JVM's current version as aString
. See JEP 223 for the expected format.- Until Java 8 included, the expected format should be starting with
1.x
- Starting with Java 9, cf. JEP-223 linked above, the version got simplified in 9.x, 10.x, etc.
- See Also:
- Until Java 8 included, the expected format should be starting with
-