/** * Get the full command line to execute, including shell command, shell arguments, executable and executable * arguments * * @param arguments arguments for the executable, not the shell * @return List of String objects, whose array version is suitable to be used as argument of * Runtime.getRuntime().exec() */ public List<String> getShellCommandLine( String[] arguments ) { List<String> commandLine = new ArrayList<String>(); if ( getShellCommand() != null ) { commandLine.add( getShellCommand() ); } if ( getShellArgs() != null ) { commandLine.addAll( getShellArgsList() ); } commandLine.addAll( getCommandLine( getOriginalExecutable(), arguments ) ); return commandLine; }