ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nico Seessle" <n...@seessle.de>
Subject [PATCH] Javac.java - Problems running javac on Windows
Date Sun, 17 Sep 2000 08:55:40 GMT
With JDK < 1.3 there seem to be some problem executing javac-processes
(using jikes) which will work with JDK 1.3. Ouput indicates "The following
character string is too long", so there seems to be a different behaviour in
command line handling. Tested with JDK 1.1.7 (IBM), JDK 1.1.7A (Visual Cafe
3.0), JDK 1.2, JDK 1.2.2 and JDK 1.3 (even with JView 5.0.3229) on W2K.

Is it OK to post patches like this? (Regarding the format that may be
resulting from pasting this to Outlook Express).

Index: Javac.java
===================================================================
RCS file:
/home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javac.jav
a,v
retrieving revision 1.39
diff -u -r1.39 Javac.java
--- Javac.java 2000/09/15 07:10:58 1.39
+++ Javac.java 2000/09/17 08:48:41
@@ -680,9 +680,12 @@
             // create a temporary file to store all the arguments

             // There have been reports that 300 files could be compiled
-            // so 250 is a conservative approach
+            // so 250 is a conservative approach, except on JDK < 1.3
+            // where this fails for mysterious reasons, so let's be extra
safe.
             if (myos.toLowerCase().indexOf("windows") >= 0
-                && args.length > 250) {
+                && (args.length > 250 ||
+                    Project.getJavaVersion().equals(Project.JAVA_1_1) ||
+                    Project.getJavaVersion().equals(Project.JAVA_1_2) ) ) {
                 PrintWriter out = null;
                 try {
                     tmpFile = new File("jikes"+(new
Random(System.currentTimeMillis())).nextLong());




Mime
View raw message