static Version parseVersion(String versionString) {
        final StringTokenizer st = new StringTokenizer(versionString, ".");
        int majorVersion = Integer.parseInt(st.nextToken());
        int minorVersion;
        if (st.hasMoreTokens())
            minorVersion = Integer.parseInt(st.nextToken());
        else
            minorVersion = 0;
        return new Version(majorVersion, minorVersion);
    }
@Test
    public void testJavaVersion() {
        Java.Version v = Java.parseVersion("9");
        assertEquals(9, v.majorVersion);
        assertEquals(0, v.minorVersion);
        assertTrue(v.isJava9Compatible());

        v = Java.parseVersion("9.0.1");
        assertEquals(9, v.majorVersion);
        assertEquals(0, v.minorVersion);
        assertTrue(v.isJava9Compatible());

        v = Java.parseVersion("9.0.0.15"); // Azul Zulu
        assertEquals(9, v.majorVersion);
        assertEquals(0, v.minorVersion);
        assertTrue(v.isJava9Compatible());

        v = Java.parseVersion("9.1");
        assertEquals(9, v.majorVersion);
        assertEquals(1, v.minorVersion);
        assertTrue(v.isJava9Compatible());

        v = Java.parseVersion("1.8.0_152");
        assertEquals(1, v.majorVersion);
        assertEquals(8, v.minorVersion);
        assertFalse(v.isJava9Compatible());

        v = Java.parseVersion("1.7.0_80");
        assertEquals(1, v.majorVersion);
        assertEquals(7, v.minorVersion);
        assertFalse(v.isJava9Compatible());
    }