< prev index next >

jdk/src/java.base/share/classes/sun/misc/Version.java.template

Print this page

        

*** 28,47 **** public class Version { private static final String launcher_name = ! "@@launcher_name@@"; private static final String java_version = ! "@@java_version@@"; private static final String java_runtime_name = ! "@@java_runtime_name@@"; private static final String java_runtime_version = ! "@@java_runtime_version@@"; static { init(); } --- 28,47 ---- public class Version { private static final String launcher_name = ! "@@LAUNCHER_NAME@@"; private static final String java_version = ! "@@VERSION_SHORT@@"; private static final String java_runtime_name = ! "@@RUNTIME_NAME@@"; private static final String java_runtime_version = ! "@@VERSION_STRING@@"; static { init(); }
*** 52,68 **** } private static boolean versionsInitialized = false; private static int jvm_major_version = 0; private static int jvm_minor_version = 0; ! private static int jvm_micro_version = 0; private static int jvm_update_version = 0; private static int jvm_build_number = 0; private static String jvm_special_version = null; private static int jdk_major_version = 0; private static int jdk_minor_version = 0; ! private static int jdk_micro_version = 0; private static int jdk_update_version = 0; private static int jdk_build_number = 0; private static String jdk_special_version = null; /** --- 52,68 ---- } private static boolean versionsInitialized = false; private static int jvm_major_version = 0; private static int jvm_minor_version = 0; ! private static int jvm_security_version = 0; private static int jvm_update_version = 0; private static int jvm_build_number = 0; private static String jvm_special_version = null; private static int jdk_major_version = 0; private static int jdk_minor_version = 0; ! private static int jdk_security_version = 0; private static int jdk_update_version = 0; private static int jdk_build_number = 0; private static String jdk_special_version = null; /**
*** 144,163 **** return jvm_minor_version; } /** ! * Returns the micro version of the running JVM if it's 1.6 or newer * or any RE VM build. It will return 0 if it's an internal 1.5 or * 1.4.x build. * @since 1.6 */ ! public static synchronized int jvmMicroVersion() { if (!versionsInitialized) { initVersions(); } ! return jvm_micro_version; } /** * Returns the update release version of the running JVM if it's * a RE build. It will return 0 if it's an internal build. --- 144,163 ---- return jvm_minor_version; } /** ! * Returns the security version of the running JVM if it's 1.6 or newer * or any RE VM build. It will return 0 if it's an internal 1.5 or * 1.4.x build. * @since 1.6 */ ! public static synchronized int jvmSecurityVersion() { if (!versionsInitialized) { initVersions(); } ! return jvm_security_version; } /** * Returns the update release version of the running JVM if it's * a RE build. It will return 0 if it's an internal build.
*** 215,232 **** } return jdk_minor_version; } /** ! * Returns the micro version of the running JDK. * @since 1.6 */ ! public static synchronized int jdkMicroVersion() { if (!versionsInitialized) { initVersions(); } ! return jdk_micro_version; } /** * Returns the update release version of the running JDK if it's * a RE build. It will return 0 if it's an internal build. --- 215,232 ---- } return jdk_minor_version; } /** ! * Returns the security version of the running JDK. * @since 1.6 */ ! public static synchronized int jdkSecurityVersion() { if (!versionsInitialized) { initVersions(); } ! return jdk_security_version; } /** * Returns the update release version of the running JDK if it's * a RE build. It will return 0 if it's an internal build.
*** 279,289 **** Character.isDigit(cs.charAt(0)) && cs.charAt(1) == '.' && Character.isDigit(cs.charAt(2)) && cs.charAt(3) == '.' && Character.isDigit(cs.charAt(4))) { jvm_major_version = Character.digit(cs.charAt(0), 10); jvm_minor_version = Character.digit(cs.charAt(2), 10); ! jvm_micro_version = Character.digit(cs.charAt(4), 10); cs = cs.subSequence(5, cs.length()); if (cs.charAt(0) == '_' && cs.length() >= 3 && Character.isDigit(cs.charAt(1)) && Character.isDigit(cs.charAt(2))) { int nextChar = 3; --- 279,289 ---- Character.isDigit(cs.charAt(0)) && cs.charAt(1) == '.' && Character.isDigit(cs.charAt(2)) && cs.charAt(3) == '.' && Character.isDigit(cs.charAt(4))) { jvm_major_version = Character.digit(cs.charAt(0), 10); jvm_minor_version = Character.digit(cs.charAt(2), 10); ! jvm_security_version = Character.digit(cs.charAt(4), 10); cs = cs.subSequence(5, cs.length()); if (cs.charAt(0) == '_' && cs.length() >= 3 && Character.isDigit(cs.charAt(1)) && Character.isDigit(cs.charAt(2))) { int nextChar = 3;
< prev index next >