Class JavaVersion

java.lang.Object
org.eclipse.jetty.util.JavaVersion

@Deprecated(since="2021-05-27") public class JavaVersion extends Object
Deprecated.
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 final String
    Deprecated.
    Context attribute that can be set to target a different version of the jvm than the current runtime.
    static final JavaVersion
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Deprecated.
    Returns the major number version, such as 1 for JDK 1.8.0_92 and 9 for JDK 9.2.4.
    int
    Deprecated.
    Returns the micro number version (aka security number), such as 0 for JDK 1.8.0_92 and 4 for JDK 9.2.4.
    int
    Deprecated.
    Returns the minor number version, such as 8 for JDK 1.8.0_92 and 2 for JDK 9.2.4.
    int
    Deprecated.
    Returns the Java Platform version, such as 8 for JDK 1.8.0_92 and 9 for JDK 9.2.4.
    Deprecated.
    int
    Deprecated.
    Deprecated.
     
    Deprecated.
     
    Deprecated.
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • JAVA_TARGET_PLATFORM

      public static final 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:
    • VERSION

      public static final JavaVersion VERSION
      Deprecated.
  • Method Details

    • parse

      public static JavaVersion parse(String v)
      Deprecated.
    • getVersion

      public String getVersion()
      Deprecated.
      Returns:
      the string from which this JavaVersion was created
    • getPlatform

      public int getPlatform()
      Deprecated.

      Returns the Java Platform version, such as 8 for JDK 1.8.0_92 and 9 for JDK 9.2.4.

      Returns:
      the Java Platform version
    • getMajor

      public int getMajor()
      Deprecated.

      Returns the major number version, such as 1 for JDK 1.8.0_92 and 9 for JDK 9.2.4.

      Returns:
      the major number version
    • getMinor

      public int getMinor()
      Deprecated.

      Returns the minor number version, such as 8 for JDK 1.8.0_92 and 2 for JDK 9.2.4.

      Returns:
      the minor number version
    • getMicro

      public int getMicro()
      Deprecated.

      Returns the micro number version (aka security number), such as 0 for JDK 1.8.0_92 and 4 for JDK 9.2.4.

      Returns:
      the micro number version
    • getUpdate

      @Deprecated public int getUpdate()
      Deprecated.

      Returns the update number version, such as 92 for JDK 1.8.0_92 and 0 for JDK 9.2.4.

      Returns:
      the update number version
    • getSuffix

      @Deprecated public String getSuffix()
      Deprecated.

      Returns the remaining string after the version numbers, such as -internal for JDK 1.8.0_92-internal and -ea for JDK 9-ea, or +13 for JDK 9.2.4+13.

      Returns:
      the remaining string after the version numbers
    • toString

      public String toString()
      Deprecated.
      Overrides:
      toString in class Object