class JVM {

  public boolean isAtLeastVersion(int minimumMajor, int minimumMinor)
    throws VersionException {

    final String version = System.getProperty("java.version");
    final StringTokenizer versionTokenizer = new StringTokenizer(version, ".");

    try {
      final int major = Integer.parseInt(versionTokenizer.nextToken());
      final int minor = Integer.parseInt(versionTokenizer.nextToken());

      return
        major >= minimumMajor &&
        minor >= minimumMinor;
    }
    catch (NoSuchElementException e) {
      throw new VersionException("Could not parse JVM version " + version);
    }
    catch (NumberFormatException e) {
      throw new VersionException("Could not parse JVM version " + version);
    }
  }

  private  JVM();

}