Class JavaArguments


  • public class JavaArguments
    extends Object
    A class used to describe the java arguments for a given command-line.
    • Constructor Detail

      • JavaArguments

        public JavaArguments()
    • Method Detail

      • getMaxMemory

        public int getMaxMemory()
        Returns the maximum memory allowed to execute the command-line.
        Returns:
        the maximum memory allowed to execute the command-line.
      • setMaxMemory

        public void setMaxMemory​(int maxMemory)
        Sets the maximum memory allowed to execute the command-line.
        Parameters:
        maxMemory - the maximum memory allowed to execute the command-line.
      • getInitialMemory

        public int getInitialMemory()
        Returns the initial memory allowed to execute the command-line.
        Returns:
        the initial memory allowed to execute the command-line.
      • setInitialMemory

        public void setInitialMemory​(int initialMemory)
        Sets the initial memory allowed to execute the command-line.
        Parameters:
        initialMemory - the initial memory allowed to execute the command-line.
      • getAdditionalArguments

        public String[] getAdditionalArguments()
        Returns the additional arguments to be used when executing the command-line.
        Returns:
        the additional arguments to be used when executing the command-line.
      • setAdditionalArguments

        public void setAdditionalArguments​(String[] additionalArguments)
        Sets the additional arguments to be used when executing the command-line.
        Parameters:
        additionalArguments - the additional arguments to be used when executing the command-line. It cannot be null.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getMessageForJLabel

        public static org.forgerock.i18n.LocalizableMessage getMessageForJLabel​(JavaArguments javaArguments,
                                                                                JavaArguments defaultJavaArguments,
                                                                                Font font)
        Returns the message in HTML format to be used in a JLabel representing a java arguments object.
        Parameters:
        javaArguments - the java arguments to be represented.
        defaultJavaArguments - the default values for the java arguments.
        font - the font to be used.
        Returns:
        the message representing a java arguments object.
      • getStringArguments

        public String getStringArguments()
        Returns a String representation of the arguments (the String that must be passed when invoking java).
        Returns:
        a String representation of the arguments (the String that must be passed when invoking java).
      • getInitialMemoryArgument

        public static String getInitialMemoryArgument​(int value)
        Returns the java argument to specify the initial memory to be used.
        Parameters:
        value - the value in megabytes to be specified.
        Returns:
        the java argument to specify the initial memory to be used.
      • getInitialMemoryGenericArgument

        public static String getInitialMemoryGenericArgument()
        Returns a generic initial memory argument (to be used in messages).
        Returns:
        a generic initial memory argument (to be used in messages).
      • getMaxMemoryArgument

        public static String getMaxMemoryArgument​(int value)
        Returns the java argument to specify the maximum memory that can be used.
        Parameters:
        value - the value in megabytes to be specified.
        Returns:
        the java argument to specify the maximum memory that can be used.
      • getMaxMemoryGenericArgument

        public static String getMaxMemoryGenericArgument()
        Returns a generic maximum memory argument (to be used in messages).
        Returns:
        a generic maximum memory argument (to be used in messages).