You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bo...@apache.org on 2012/04/08 07:30:08 UTC

svn commit: r1310956 - /ant/core/trunk/src/tests/antunit/taskdefs/exec/exec-test.xml

Author: bodewig
Date: Sun Apr  8 05:30:07 2012
New Revision: 1310956

URL: http://svn.apache.org/viewvc?rev=1310956&view=rev
Log:
likely a 'space in path' issue as well

Modified:
    ant/core/trunk/src/tests/antunit/taskdefs/exec/exec-test.xml

Modified: ant/core/trunk/src/tests/antunit/taskdefs/exec/exec-test.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/taskdefs/exec/exec-test.xml?rev=1310956&r1=1310955&r2=1310956&view=diff
==============================================================================
--- ant/core/trunk/src/tests/antunit/taskdefs/exec/exec-test.xml (original)
+++ ant/core/trunk/src/tests/antunit/taskdefs/exec/exec-test.xml Sun Apr  8 05:30:07 2012
@@ -631,7 +631,7 @@
     <target name="testDoesntWaitForChildren"
             description="https://issues.apache.org/bugzilla/show_bug.cgi?id=5003">
       <condition property="java"
-                 value="${java.home}/bin/javaw.exe"
+                 value="${java.home}/bin/java.exe"
                  else="${java.home}/bin/java">
         <os family="dos"/>
       </condition>
@@ -639,15 +639,15 @@
       <pathconvert dirsep="/" property="out">
         <path location="${output}"/>
       </pathconvert>
-      <pathconvert dirsep="/" property="javaP">
-        <path location="${java}"/>
-      </pathconvert>
       <echo file="${input}/org/example/CallHello.java"><![CDATA[
 package org.example;
 public class CallHello {
     public static void main(String[] args)
         throws Exception {
-        Runtime.getRuntime().exec("${javaP} -cp ${out} org.example.Hello");
+        String[] cmd = new String[] {
+            "${java}", "-cp", "${out}", "org.example.Hello"
+        };
+        Runtime.getRuntime().exec(cmd);
         Thread.sleep(1 * 1000);
         System.out.println("finished");
     }