Class RequiredJavaVersion


  • public final class RequiredJavaVersion
    extends Object
    Provides check methods whether the current JVM meets the requirements to run the AristaFlow applications.
    • Method Detail

      • checkJavaProduct

        public static Pair<Boolean,​String> checkJavaProduct​(String productName)
        Checks for whether the product with the current JVM is the right JVM version for the designated product. If this is not the case, a message based on the designated product name will be returned together with a Boolean indicating how to use the message.

        Use the return value as follows:

        • null: Everything is fine, ignore the message (which will be also null.
        • false: The current Java is unknown, the message could be used as warning.
        • true: The current Java is known and does not meet the requirements, use the message to abort/fail.
        Parameters:
        productName - The name of the product for which the JVM version is checked.
        Returns:
        A pair of a Boolean indicating how to use the message string providing information on the required java version. If the current JVM version is appropriate and known, the Boolean will be null, if the current JVM version is unknown the Boolean will be false and if the current JVM is known to be inappropriate the Boolean will be true.
      • checkJavaMessage

        public static Pair<Boolean,​String> checkJavaMessage​(String preformattedFailMsg,
                                                                  String preformattedWarnMsg)
        Checks for whether the product with the current JVM is the right JVM version for the designated product. If this is not the case, a message based on the designated preformatted message will be filled with the appropriate information and returned together with a Boolean indicating how to use the message.

        Use the return value as follows:

        • null: Everything is fine, ignore the message (which will be also null.
        • false: The current Java is unknown, the message could be used as warning.
        • true: The current Java is known and does not meet the requirements, use the message to abort/fail.
        Parameters:
        preformattedFailMsg - The preformatted fail message used for the created message in case the current JVM version is not appropriate. The designated message can contain arguments for the company name (%1$s), the minimum version (%2$) and the current version (%3$s).
        preformattedWarnMsg - The preformatted warning message used for the created message in case the current JVM version is unknown. The designated message can contain arguments for the company name (%1$s) and the current version (%2$s).
        Returns:
        A pair of a Boolean indicating how to use the message string providing information on the required java version. If the current JVM version is appropriate and known, the Boolean will be null, if the current JVM version is unknown the Boolean will be false and if the current JVM is known to be inappropriate the Boolean will be true.
      • checkJavaMessage

        public static Pair<Boolean,​String> checkJavaMessage​(String preformattedFailMsg,
                                                                  String preformattedWarnMsg,
                                                                  String preformattedFcsMsg)
        Checks for whether the product with the current JVM is the right JVM version for the designated product. If this is not the case, a message based on the designated preformatted message will be filled with the appropriate information and returned together with a Boolean indicating how to use the message.

        Use the return value as follows:

        • null: Everything is fine, ignore the message (which will be also null.
        • false: The current Java is unknown, the message could be used as warning.
        • true: The current Java is known and does not meet the requirements, use the message to abort/fail.
        Parameters:
        preformattedFailMsg - The preformatted fail message used for the created message in case the current JVM version is not appropriate. The designated message can contain arguments for the company name (%1$s), the minimum version (%2$) and the current version (%3$s).
        preformattedWarnMsg - The preformatted warning message used for the created message in case the current JVM version is unknown. The designated message can contain arguments for the company name (%1$s) and the current version (%2$s).
        preformattedFcsMsg - The preformatted warning message used for the created message in case the current JVM version is a known JVM in a non-FCS variant. The designated message can contain arguments for the company name (%1$s) and the current version (%2$s).
        Returns:
        A pair of a Boolean indicating how to use the message string providing information on the required java version. If the current JVM version is appropriate and known, the Boolean will be null, if the current JVM version is unknown the Boolean will be false and if the current JVM is known to be inappropriate the Boolean will be true.
      • checkJava

        protected static Pair<Boolean,​String> checkJava​(String preformattedFailMsg,
                                                              String preformattedWarnMsg,
                                                              String preformattedFcsMsg,
                                                              String productName)
        Checks for whether the product with the current JVM is the right JVM version for the designated product. If this is not the case, a message based on the designated preformatted message or the designated product name will be filled with the appropriate information and returned together with a Boolean indicating how to use the message.

        Use the return value as follows:

        • null: Everything is fine, ignore the message (which will be also null.
        • false: The current Java is unknown, the message could be used as warning.
        • true: The current Java is known and does not meet the requirements, use the message to abort/fail.
        Parameters:
        preformattedFailMsg - The preformatted fail message used for the created message in case the current JVM version is not appropriate. The designated message can contain arguments for the company name (%1$s), the minimum version (%2$) and the current version (%3$s). If this is null a default message will be used.
        preformattedWarnMsg - The preformatted warning message used for the created message in case the current JVM version is unknown or a non-FCS. The designated message can contain arguments for the company name (%1$s) and the current version (%2$s).
        preformattedFcsMsg - The preformatted warning message used for the created message in case the current JVM version is a known JVM in a non-FCS variant. The designated message can contain arguments for the company name (%1$s) and the current version (%2$s).
        productName - The name of the product for which the JVM version is checked. This should only be null in case the preformatted message is not null.
        Returns:
        A pair of a Boolean indicating how to use the message string providing information on the required java version. If the current JVM version is appropriate and known, the Boolean will be null, if the current JVM version is unknown the Boolean will be false and if the current JVM is known to be inappropriate the Boolean will be true.