activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r360499 - /incubator/activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/impl/SeparateBrokerProcessAgentImpl.java
Date Sun, 01 Jan 2006 17:21:15 GMT
Author: adc
Date: Sun Jan  1 09:21:13 2006
New Revision: 360499

URL: http://svn.apache.org/viewcvs?rev=360499&view=rev
Log:
Modified to compile under JDK14

Modified:
    incubator/activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/impl/SeparateBrokerProcessAgentImpl.java

Modified: incubator/activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/impl/SeparateBrokerProcessAgentImpl.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/impl/SeparateBrokerProcessAgentImpl.java?rev=360499&r1=360498&r2=360499&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/impl/SeparateBrokerProcessAgentImpl.java
(original)
+++ incubator/activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/impl/SeparateBrokerProcessAgentImpl.java
Sun Jan  1 09:21:13 2006
@@ -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 @@
     // 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;
     }
 



Mime
View raw message