public class JdkVersion extends Object implements Comparable<JdkVersion>
Modifier and Type | Method and Description |
---|---|
int |
compareTo(JdkVersion otherVersion) |
int |
compareTo(String versionString) |
static JdkVersion |
getJdkVersion() |
int |
getMaintenance() |
int |
getMajor() |
int |
getMinor() |
int |
getUpdate() |
boolean |
isUnsafeSupported()
Returns true if
sun.misc.Unsafe is present in the
current JDK version, or false otherwise. |
static JdkVersion |
parseVersion(String versionString) |
String |
toString() |
public static JdkVersion parseVersion(String versionString)
public static JdkVersion getJdkVersion()
public int getMajor()
public int getMinor()
public int getMaintenance()
public int getUpdate()
public boolean isUnsafeSupported()
sun.misc.Unsafe
is present in the
current JDK version, or false otherwise.public int compareTo(String versionString)
public int compareTo(JdkVersion otherVersion)
compareTo
in interface Comparable<JdkVersion>
Copyright © 2007-2024, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.