components/ciphertool/src/main/java/org/wso2/ciphertool/CipherTool.java
private static void initialize(String[] args) {
        String property;
        for (String arg : args) {
            if (arg.equals("-help")) {
                printHelp();
                System.exit(0);
            } else if (arg.substring(0, 2).equals("-D")) {
                property = arg.substring(2);
                if (property.equals(Constants.CONFIGURE)) {
                    System.setProperty(property, Constants.TRUE);
                } else if (property.equals(Constants.CHANGE)) {
                    System.setProperty(property, Constants.TRUE);
                } else if (property.substring(0, 8).equals(Constants.CONSOLE_PASSWORD_PARAM)) {
                    System.setProperty(Constants.KEYSTORE_PASSWORD, property.substring(9));
                } else {
                    System.out.println("This option is not define!");
                    System.exit(-1);
                }
            }
        }
        Utils.setSystemProperties();
    }
/**
     * init the mode of operation of cipher tool using command line argument
     *
     * @param args command line arguments
     */
init the mode of operation of cipher tool using command line argument

@param args command line arguments
init the mode of operation of cipher tool using command line argument @param args command line arguments
private static void initialize(String[] args) {
        String property;
        for (String arg : args) {
            if (arg.equals("-help")) {
                printHelp();
                System.exit(0);
            } else if (arg.substring(0, 2).equals("-D")) {
                property = arg.substring(2);
                if (property.equals(Constants.CONFIGURE)) {
                    System.setProperty(property, Constants.TRUE);
                } else if (property.equals(Constants.CHANGE)) {
                    System.setProperty(property, Constants.TRUE);
                } else if (property.substring(0, 8).equals(Constants.CONSOLE_PASSWORD_PARAM)) {
                    System.setProperty(Constants.KEYSTORE_PASSWORD, property.substring(9));
                } else {
                    System.out.println("This option is not define!");
                    System.exit(-1);
                }
            }
        }
        Utils.setSystemProperties();
    }
private static void initialize ( String [ ] args ) { String property ; for ( String arg : args ) { if ( arg . equals ( "-help" ) ) { printHelp ( ) ; System . exit ( 0 ) ; } else if ( arg . substring ( 0 , 2 ) . equals ( "-D" ) ) { property = arg . substring ( 2 ) ; if ( property . equals ( Constants . CONFIGURE ) ) { System . setProperty ( property , Constants . TRUE ) ; } else if ( property . equals ( Constants . CHANGE ) ) { System . setProperty ( property , Constants . TRUE ) ; } else if ( property . substring ( 0 , 8 ) . equals ( Constants . CONSOLE_PASSWORD_PARAM ) ) { System . setProperty ( Constants . KEYSTORE_PASSWORD , property . substring ( 9 ) ) ; } else { System . out . println ( "This option is not define!" ) ; System . exit ( - 1 ) ; } } } Utils . setSystemProperties ( ) ; }
init the mode of operation of cipher tool using command line argument
init the mode of operation of cipher tool using command line argument