Class JmtVersion

java.lang.Object
legacyxml.JmtVersion

public final class JmtVersion extends Object
Reads the jmtVersion a file was saved with and compares versions, so the GUI can warn before opening a file written by a newer JMT.
  • Method Details

    • readFileVersion

      public static String readFileVersion(File file)
      Reads the version from the root element only (does not parse the whole file).
      Returns:
      the version, or null if the file has none (saved by a release up to 1.4.0) or is not readable XML
    • isNewer

      public static boolean isNewer(String fileVersion, String runningVersion)
      Returns:
      true if fileVersion is strictly newer than runningVersion. Compares the dotted numeric part ("1.4.0" < "1.10"); qualifiers such as "-BETA2" are ignored. Missing or unparseable versions are never newer, so an odd value cannot raise a false alarm.