Browse Source

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 <nico@seessle.de>


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@267996 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 25 years ago
parent
commit
aa71851fb7
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/main/org/apache/tools/ant/taskdefs/Javac.java

+ 2
- 1
src/main/org/apache/tools/ant/taskdefs/Javac.java View File

@@ -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();


Loading…
Cancel
Save