From aa71851fb70c3ebd6c7ee56a4df257760eb1ef08 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Fri, 15 Sep 2000 07:10:58 +0000 Subject: [PATCH] When using the temporary file to hold the source file names (in jikes compilation on Windows) Ant included the command itself as well as all arguments as source files. PR: #74 (linked to bug #31) Submitted by: Nico Seessle git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@267996 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/taskdefs/Javac.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/Javac.java b/src/main/org/apache/tools/ant/taskdefs/Javac.java index fcbb38a49..6423946d8 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Javac.java +++ b/src/main/org/apache/tools/ant/taskdefs/Javac.java @@ -667,6 +667,7 @@ public class Javac extends MatchingTask { /** * Do the compile with the specified arguments. * @param args - arguments to pass to process on command line + * @param firstFileName - index of the first source file in args */ private int executeJikesCompile(String[] args, int firstFileName) { String[] commandArray = null; @@ -686,7 +687,7 @@ public class Javac extends MatchingTask { try { tmpFile = new File("jikes"+(new Random(System.currentTimeMillis())).nextLong()); out = new PrintWriter(new FileWriter(tmpFile)); - for (int i = 0; i < args.length; i++) { + for (int i = firstFileName; i < args.length; i++) { out.println(args[i]); } out.flush();