Changeset 767 for java/PlatformTools/src/net/oni2/platformtools/applicationinvoker/ApplicationInvoker.java
- Timestamp:
- Mar 31, 2013, 6:02:09 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
java/PlatformTools/src/net/oni2/platformtools/applicationinvoker/ApplicationInvoker.java
r724 r767 19 19 public class ApplicationInvoker { 20 20 private static Vector<String> buildCommandLine(EExeType exeType, 21 File program, Vector<String> params )21 File program, Vector<String> params, boolean ignoreFileNotFound) 22 22 throws ERuntimeNotInstalledException, FileNotFoundException { 23 if (program.getParentFile() != null && !program.exists()) 24 throw new FileNotFoundException(); 23 if (!ignoreFileNotFound) 24 if (program.getParentFile() != null && !program.exists()) 25 throw new FileNotFoundException(); 25 26 Vector<String> cmdLine = new Vector<String>(); 26 27 switch (exeType) { … … 80 81 * @param params 81 82 * List of command and arguments 83 * @param ignoreFileNotFound 84 * Ignore if the program file is not found 82 85 * @return Error code and list of output lines 83 86 * @throws IOException … … 90 93 */ 91 94 public static ApplicationInvocationResult executeAndWait(EExeType exeType, 92 File workingDirectory, File program, Vector<String> params )93 throws ERuntimeNotInstalledException, FileNotFoundException,94 IOException {95 File workingDirectory, File program, Vector<String> params, 96 boolean ignoreFileNotFound) throws ERuntimeNotInstalledException, 97 FileNotFoundException, IOException { 95 98 return executeAndWait(workingDirectory, 96 buildCommandLine(exeType, program, params ));99 buildCommandLine(exeType, program, params, ignoreFileNotFound)); 97 100 } 98 101 … … 108 111 * @param params 109 112 * List of command and arguments 113 * @param ignoreFileNotFound 114 * Ignore if the program file is not found 110 115 * @throws ERuntimeNotInstalledException 111 116 * If the program to be executed requires a runtime which could … … 115 120 */ 116 121 public static void execute(EExeType exeType, File workingDirectory, 117 File program, Vector<String> params )122 File program, Vector<String> params, boolean ignoreFileNotFound) 118 123 throws ERuntimeNotInstalledException, FileNotFoundException { 119 execute(buildCommandLine(exeType, program, params), workingDirectory); 124 execute(buildCommandLine(exeType, program, params, ignoreFileNotFound), 125 workingDirectory); 120 126 } 121 127
Note:
See TracChangeset
for help on using the changeset viewer.