private static int parseJavaVersion ( ) { String [ ] parts = JAVA_SPECIFICATION_VERSION . split ( "\\." ) ; int nbParts = parts . length ; int majorIndex = nbParts > 1 ? 1 : 0 ; return Integer . parseInt ( parts [ majorIndex ] ) ; }
Parse java version .