// // Can we change the working directory of the process?
try {
Method m = Runtime.class.getMethod("exec", new Class[] { //$NON-NLS-1$
String[].class, String[].class, File.class });
Process prc = (Process) m.invoke(Runtime.getRuntime(), new Object[] { cmdargs, envp, workingDir });
process = new ProcessMonitor(launcher.getName(), prc);
} catch (Throwable t) {
if (workingDir != null) {
throw new IOException(Messages.getString("JavaApplicationType.failedToChangeWorkingDirectory") //$NON-NLS-1$
+ "changed, but this Java Virtual Machine does not support that."); //$NON-NLS-1$
}
process = new ProcessMonitor(launcher.getName(), Runtime.getRuntime().exec(cmdargs));
}
} catch (IOException ex) {
if (events != null)
events.debug(MessageFormat.format(Messages.getString("JavaApplicationType.processExecutionFailed"), new Object[] { ex.getMessage() })); //$NON-NLS-1$
}