Class VersionChecker

java.lang.Object
org.omegat.util.VersionChecker

public final class VersionChecker extends Object
A class for checking for updated versions of OmegaT.
  • Method Details

    • getInstance

      public static VersionChecker getInstance()
    • isUpToDate

      public boolean isUpToDate(boolean force) throws Exception
      Check if OmegaT is up to date.
      Parameters:
      force - If true, fetch the latest data from the server even if the current data is not stale yet
      Throws:
      Exception
    • getRemoteVersion

      public String getRemoteVersion()
    • compareVersions

      public static int compareVersions(String version1, String update1, String version2, String update2)
      Compares OmegaT version numbers.
      Parameters:
      version1 - e.g. "5.4.0"
      update1 - e.g. "0"
      version2 - e.g. "3.0.6"
      update2 - "1"
      Returns:
      value 0 if version1 update1 == version2 update2; value less than 0 if version1 update1 < version2 update2; and value greater than 0 if version1 update1 > version2 update2
    • compareMinorVersions

      public static int compareMinorVersions(String version1, String version2)