FileDocCategorySizeDatePackage
JvmOptionsCommand.javaAPI DocGlassfish v2 API3147Fri May 04 22:25:12 BST 2007com.sun.enterprise.cli.commands

JvmOptionsCommand

public class JvmOptionsCommand extends GenericCommand

Fields Summary
private static final String
ERROR_MSG
private static final String
LINE_SEPARATOR
Constructors Summary
Methods Summary
protected voidhandleReturnValue(java.lang.Object retVal)


        
        final String[] invalidOptions = (String[])retVal;
        if (invalidOptions.length > 0)
        {
            printErrorMsg();
            printInvalidJvmOptions(invalidOptions);
            throw new RuntimeException();
        }
    
voidprintErrorMsg()

        final String key = (String)((Vector)getProperty(ERROR_MSG)).get(0);
        CLILogger.getInstance().printError(getLocalizedString(key));
    
voidprintInvalidJvmOptions(java.lang.Object[] oa)

        StringBuffer sb = new StringBuffer("");
        for (int i = 0; i < oa.length; i++) {
            sb.append(oa[i].toString());
            if (i < oa.length - 1) {
                //separate only the options.
                sb.append(LINE_SEPARATOR);
            }
        }
        CLILogger.getInstance().printError(sb.toString());