ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher Elkins" <celk...@scardini.com>
Subject [PATCH] Runtime JAR not properly added to classpath for > JAVA_1_1
Date Wed, 12 Jul 2000 07:09:53 GMT
Hi, all.

For a stock JDK1.3 installation, the system property "java.home" returns the JRE
path (e.g., "C:\Program Files\JavaSoft\JRE\1.3") not the JDK path (e.g.,
"C:\jdk1.3"). Therefore, Javac.getCompileClasspath(true) adds an erroneous entry
to the classpath - "C:\Program Files\JavaSoft\JRE\1.3\jre\lib\rt.jar" - which is
subsequently removed in Javac.addExistingToClasspath(...) because the specfied
JAR does not actually exist (in that location). In most cases, this is not a
problem because rt.jar is automatically found by javac. However, it prevents
jikes from working if you don't already have rt.jar in your system classpath.

The patch below fixes this problem for JDK 1.3. I am currently unable to test it
under JDK 1.2, however, I imagine that it works in a similar fashion.

--
Christopher Elkins


--
Index: src/main/org/apache/tools/ant/taskdefs/Javac.java
===================================================================
RCS file:
/home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javac.java,v
retrieving revision 1.19
diff -u -r1.19 Javac.java
--- src/main/org/apache/tools/ant/taskdefs/Javac.java 2000/07/11 15:12:30 1.19
+++ src/main/org/apache/tools/ant/taskdefs/Javac.java 2000/07/12 07:00:36
@@ -404,7 +404,6 @@
             } else {
                 addExistingToClasspath(classpath,
                                        System.getProperty("java.home")
-                                       + File.separator +"jre"
                                        + File.separator + "lib"
                                        + File.separator + "rt.jar");
             }



Mime
View raw message