Here you can find the source of substituteCommandLine(String[] parsedCommandLine, String file1Name, String file2Name, String display1, String display2)
static String[] substituteCommandLine(String[] parsedCommandLine, String file1Name, String file2Name,
String display1, String display2)
//package com.java2s; // Licensed under the Apache License, Version 2.0 (the "License"); public class Main { static String[] substituteCommandLine(String[] parsedCommandLine, String file1Name, String file2Name, String display1, String display2) { for (int i = 0; i < parsedCommandLine.length; i++) { if (parsedCommandLine[i].equals("file1Name")) { parsedCommandLine[i] = file1Name; } else if (parsedCommandLine[i].equals("file2Name")) { parsedCommandLine[i] = file2Name; } else if (parsedCommandLine[i].equals("display1")) { parsedCommandLine[i] = display1; } else if (parsedCommandLine[i].equals("display2")) { parsedCommandLine[i] = display2; }/* w ww. j a v a2s .c o m*/ } return parsedCommandLine; } }