private List<String> buildCommandLine(){
  List<String> commandLine=new ArrayList<String>();
  commandLine.add(executable);
  commandLine.addAll(jvmArguments);
  commandLine.addAll(systemProperties);
  if (classpath != null && jarPath == null) {
    commandLine.add("-classpath");
    commandLine.add(classpath);
  }
  if (jarPath != null) {
    commandLine.add("-jar");
    commandLine.add(jarPath);
  }
  if (jarPath == null) {
    commandLine.add(mainClass);
  }
  commandLine.addAll(applicationArguments);
  return commandLine;
}

private List < String > buildCommandLine ( ) { List < String > commandLine = new ArrayList < String > ( ) ; commandLine . add ( executable ) ; commandLine . addAll ( jvmArguments ) ; commandLine . addAll ( systemProperties ) ; if ( classpath != null && jarPath == null ) { commandLine . add ( "-classpath" ) ; commandLine . add ( classpath ) ; } if ( jarPath != null ) { commandLine . add ( "-jar" ) ; commandLine . add ( jarPath ) ; } if ( jarPath == null ) { commandLine . add ( mainClass ) ; } commandLine . addAll ( applicationArguments ) ; return commandLine ; }
build the complete command line .
