question: public static void keytool ( String cmd ) { log . info ( "keytool " + cmd ) ; ArrayList < String > list = new ArrayList < String > ( ) ; StringTokenizer st = new StringTokenizer ( cmd , " " ) ; String quoteBuffer = null ; while ( st . hasMoreTokens ( ) ) { String token = st . nextToken ( ) ; if ( quoteBuffer == null ) { if ( token . startsWith ( "\"" ) ) quoteBuffer = token . substring ( 1 ) ; else list . add ( token ) ; } else quoteBuffer += " " + token ; if ( token . endsWith ( "\"" ) ) { String str = quoteBuffer . substring ( 0 , quoteBuffer . length ( ) - 1 ) ; list . add ( str ) ; quoteBuffer = null ; } } String [ ] args = new String [ list . size ( ) ] ; list . toArray ( args ) ; try { KeyTool . main ( args ) ; } catch ( Exception e ) { } }
target:  Submit Command to Key Tool