Index: Javac.java
===================================================================
RCS file: /home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javac.java,v
retrieving revision 1.45
diff -u -r1.45 Javac.java
--- Javac.java	2000/09/29 15:40:33	1.45
+++ Javac.java	2000/10/02 20:15:19
@@ -747,15 +747,15 @@
         File tmpFile = null;
 
         try {
-            String myos = System.getProperty("os.name");
-
-            // Windows has a 32k limit on total arg size, so
-            // 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
-            if (myos.toLowerCase().indexOf("windows") >= 0 
-                && args.length > 250) {
+            long length = 0;
+            
+            for (int i = 0; i < args.length; i++) { 
+                length += args[i].length();
+            }
+            
+            // 4k is the Limit according to POSIX, so we try to use
+            // a temp. file to pass source-files to jikes/jvc
+            if (length > 4000) {
                 PrintWriter out = null;
                 try {
                     tmpFile = new File("jikes"+(new Random(System.currentTimeMillis())).nextLong());

