Class VersionInfo


  • @PublicAPI
    public class VersionInfo
    extends Object
    Provides version information of ChemAxon products.
    • Constructor Detail

      • VersionInfo

        public VersionInfo()
    • Method Detail

      • getVersion

        public static String getVersion()
        Returns the product version.
        Returns:
        the product version string, e.g. "17.35.3".
      • getDisplayVersion

        public static String getDisplayVersion()
        Returns the display version.
        Returns:
        the display version string, e.g. "17.35".
      • getInternalVersionId

        public static String getInternalVersionId()
        Returns the internal version identifier.
        Returns:
        the internal version identifier string, e.g. "17.35.3-6789".
      • getJChemTableVersion

        public static int getJChemTableVersion()
        Returns the internal version number of JChem database tables.
        Returns:
        the internal version number of JChem database tables, e.g. 18180000.
      • getBuildTimestamp

        public static Date getBuildTimestamp()
        Returns the build date and time.
        Returns:
        the build timestamp as Date.
      • getBuildDate

        public static String getBuildDate()
        Returns the build date as string (in local time zone).
        Returns:
        the build date as string, e.g. "2023-03-15".
      • getBuildTime

        public static String getBuildTime()
        Returns the build time as string (in local time zone).
        Returns:
        the build time as string, e.g. "21:09:46".
      • getBuildYear

        public static String getBuildYear()
        Returns the year of the build date as string.
        Returns:
        the build year as string, e.g. "2023".
      • getBuildTimestampStr

        protected static String getBuildTimestampStr()
        Returns the build date and time as string in UTC time zone.
        Returns:
        the build timestamp as string in UTC time zone, e.g. "2017-03-15 20:09:46 UTC".
      • getJavaVersionStr

        protected static String getJavaVersionStr()
        Returns the Java VM version information as string.
        Returns:
        the Java VM version, e.g. "1.8.0_112 (Oracle Corporation 25.112-b15)".
      • getOsVersionStr

        protected static String getOsVersionStr()
        Returns the OS version information as string.
        Returns:
        the OS version, e.g. "Windows 7 6.1 (amd64)".
      • main

        public static void main​(String[] args)
        Main method that prints out the version information into the standard output.

        If no argument is given, prints out full version information (version, internal version, build date, etc.).

        Parameters:
        args - Command-line arguments:
        • -version Prints only the version
        • -id Prints only the internal version ID
        • -date Prints only the build date (timestamp)