public static double getJavaRunningVersionAsDouble() {
        String version = System.getProperty("java.version");
        int pos = version.indexOf('.');
        pos = version.indexOf('.', pos + 1);
        return Double.parseDouble(version.substring(0, pos));
    }
public static double getJavaRunningVersionAsDouble ( ) { String version = System . getProperty ( "java.version" ) ; int pos = version . indexOf ( '.' ) ; pos = version . indexOf ( '.' , pos + 1 ) ; return Double . parseDouble ( version . substring ( 0 , pos ) ) ; }
getJavaRunningVersionAsDouble, Returns a double with the currently running java version.