Package org.eclipse.jetty.util
Class JavaVersion
- java.lang.Object
-
- org.eclipse.jetty.util.JavaVersion
-
@Deprecated(since="2021-05-27") public class JavaVersion extends java.lang.ObjectDeprecated.The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.Java Version Utility class.Parses java versions to extract a consistent set of version parts
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringJAVA_TARGET_PLATFORMDeprecated.Context attribute that can be set to target a different version of the jvm than the current runtime.static JavaVersionVERSIONDeprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intgetMajor()Deprecated.Returns the major number version, such as1for JDK 1.8.0_92 and9for JDK 9.2.4.intgetMicro()Deprecated.Returns the micro number version (aka security number), such as0for JDK 1.8.0_92 and4for JDK 9.2.4.intgetMinor()Deprecated.Returns the minor number version, such as8for JDK 1.8.0_92 and2for JDK 9.2.4.intgetPlatform()Deprecated.Returns the Java Platform version, such as8for JDK 1.8.0_92 and9for JDK 9.2.4.java.lang.StringgetSuffix()Deprecated.intgetUpdate()Deprecated.java.lang.StringgetVersion()Deprecated.static JavaVersionparse(java.lang.String v)Deprecated.java.lang.StringtoString()Deprecated.
-
-
-
Field Detail
-
JAVA_TARGET_PLATFORM
public static final java.lang.String JAVA_TARGET_PLATFORM
Deprecated.Context attribute that can be set to target a different version of the jvm than the current runtime. Acceptable values should correspond to those returned by JavaVersion.getPlatform().- See Also:
- Constant Field Values
-
VERSION
public static final JavaVersion VERSION
Deprecated.
-
-
Method Detail
-
parse
public static JavaVersion parse(java.lang.String v)
Deprecated.
-
getVersion
public java.lang.String getVersion()
Deprecated.- Returns:
- the string from which this JavaVersion was created
-
getPlatform
public int getPlatform()
Deprecated.Returns the Java Platform version, such as
8for JDK 1.8.0_92 and9for JDK 9.2.4.- Returns:
- the Java Platform version
-
getMajor
public int getMajor()
Deprecated.Returns the major number version, such as
1for JDK 1.8.0_92 and9for JDK 9.2.4.- Returns:
- the major number version
-
getMinor
public int getMinor()
Deprecated.Returns the minor number version, such as
8for JDK 1.8.0_92 and2for JDK 9.2.4.- Returns:
- the minor number version
-
getMicro
public int getMicro()
Deprecated.Returns the micro number version (aka security number), such as
0for JDK 1.8.0_92 and4for JDK 9.2.4.- Returns:
- the micro number version
-
getUpdate
@Deprecated public int getUpdate()
Deprecated.Returns the update number version, such as
92for JDK 1.8.0_92 and0for JDK 9.2.4.- Returns:
- the update number version
-
getSuffix
@Deprecated public java.lang.String getSuffix()
Deprecated.Returns the remaining string after the version numbers, such as
-internalfor JDK 1.8.0_92-internal and-eafor JDK 9-ea, or+13for JDK 9.2.4+13.- Returns:
- the remaining string after the version numbers
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toStringin classjava.lang.Object
-
-