Modified to compile under JDK14

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@360499 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Alan Cabrera 2006-01-01 17:21:13 +00:00
parent 61ab31e758
commit 673f323e18
1 changed files with 12 additions and 12 deletions

View File

@ -16,13 +16,13 @@
*/
package org.apache.activemq.systest.impl;
import java.io.File;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.systest.BrokerAgent;
import javax.jms.ConnectionFactory;
import java.io.*;
import java.util.Iterator;
/**
* Runs a broker in a separate process
@ -94,20 +94,20 @@ public class SeparateBrokerProcessAgentImpl extends SeparateProcessAgent impleme
// Implementation methods
// -------------------------------------------------------------------------
protected Process createProcess() throws Exception {
ProcessBuilder builder = new ProcessBuilder(getCommands());
File workingDir = createBrokerWorkingDirectory();
String commands[] = getCommands();
System.out.print("About to execute command:");
for (Iterator iter = builder.command().iterator(); iter.hasNext();) {
System.out.print(" " + iter.next());
for (int i=0; i<commands.length; i++) {
System.out.print(" ");
System.out.print(commands[i]);
}
System.out.println();
File workingDir = createBrokerWorkingDirectory();
System.out.println("In directory: " + workingDir);
builder = builder.directory(workingDir);
builder = builder.redirectErrorStream(true);
Process answer = builder.start();
Process answer = Runtime.getRuntime().exec(commands, null, workingDir);
return answer;
}