Class JVMUtil


  • public final class JVMUtil
    extends Object
    Utility class for Java/JVM specific utilities.
    • Method Detail

      • getCanonicalSpecVersion

        public static int getCanonicalSpecVersion()
        Returns the canonized number of the currently available Java language specification version.

        The numbering scheme of the specification versions is structured as follows:

        • Java SE 7: 1.7
        • Java SE 8: 1.8
        • Java SE 9: 9
        • Java SE 10: 10
        This method returns:
        • Java SE 7: 7
        • Java SE 8: 8
        • Java SE 9: 9
        • Java SE 10: 10
        Returns:
        the canonized java specification version
        See Also:
        RuntimeMXBean.getSpecVersion()