static public int getJDKVersion(String javaVersionStr) {
        int version = 0;

        for (char ch : javaVersionStr.toCharArray()) {
            if (Character.isDigit(ch)) {
                version = (version * 10) + (ch - 48);
            } else if (version == 1) {
                version = 0;
            } else {
                break;
            }
        }
        return version;
    }
@Test
    public void jdkVersion() {
        Assertions.assertEquals(4, EnvUtil.getJDKVersion("1.4.xx"));
        Assertions.assertEquals(5, EnvUtil.getJDKVersion("1.5"));
        Assertions.assertEquals(5, EnvUtil.getJDKVersion("1.5.xx"));
        Assertions.assertEquals(5, EnvUtil.getJDKVersion("1.5AA"));
        Assertions.assertEquals(9, EnvUtil.getJDKVersion("9EA"));
        Assertions.assertEquals(9, EnvUtil.getJDKVersion("9.0.1"));
        Assertions.assertEquals(18, EnvUtil.getJDKVersion("18.3+xx"));
        Assertions.assertEquals(21, EnvUtil.getJDKVersion("21.0.1"));
    }