protected String [ ] fixupArgs ( String [ ] args ) { List < String > fixedArgs = new ArrayList <> ( ) ; for ( int i = 0 ; i < args . length ; i ++ ) { String arg = args [ i ] ; if ( ( arg . startsWith ( "--" ) || arg . startsWith ( "-D" ) ) && ! arg . contains ( "=" ) ) { String nextArg = null ; if ( ( i + 1 ) < args . length ) { nextArg = args [ i + 1 ] ; } if ( ( nextArg != null ) && ! nextArg . startsWith ( "--" ) && ! isCommand ( nextArg ) ) { arg = arg + "=" + nextArg ; i ++ ; } } // Sometimes, commas are still escaped as \, at this point, fix it: arg = arg . replace ( "\\," , "," ) ; fixedArgs . add ( arg ) ; } return fixedArgs . toArray ( new String [ fixedArgs . size ( ) ] ) ; }
On windows machines it splits args on = signs . Put it back like it was .