Based on patch submitted by: Otto Moerbeek <omoerbeek@mac.com> git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269356 13f79535-47bb-0310-9956-ffa450edef68master
@@ -152,6 +152,9 @@ public abstract class DefaultCompilerAdapter implements CompilerAdapter { | |||||
} | } | ||||
if (includeJavaRuntime) { | if (includeJavaRuntime) { | ||||
// XXX move this stuff to a separate class, code is identical to | |||||
// code in ../rmic/DefaultRmicAdapter | |||||
if (System.getProperty("java.vendor").toLowerCase().indexOf("microsoft") >= 0) { | if (System.getProperty("java.vendor").toLowerCase().indexOf("microsoft") >= 0) { | ||||
// Pull in *.zip from packages directory | // Pull in *.zip from packages directory | ||||
FileSet msZipFiles = new FileSet(); | FileSet msZipFiles = new FileSet(); | ||||
@@ -178,6 +181,18 @@ public abstract class DefaultCompilerAdapter implements CompilerAdapter { | |||||
+ File.separator +"jre" | + File.separator +"jre" | ||||
+ File.separator + "lib" | + File.separator + "lib" | ||||
+ File.separator + "rt.jar")); | + File.separator + "rt.jar")); | ||||
// Added for MacOS X | |||||
classpath.addExisting(new Path(null, | |||||
System.getProperty("java.home") | |||||
+ File.separator + ".." | |||||
+ File.separator + "Classes" | |||||
+ File.separator + "classes.jar")); | |||||
classpath.addExisting(new Path(null, | |||||
System.getProperty("java.home") | |||||
+ File.separator + ".." | |||||
+ File.separator + "Classes" | |||||
+ File.separator + "ui.jar")); | |||||
} | } | ||||
} | } | ||||
@@ -143,6 +143,9 @@ public abstract class DefaultRmicAdapter implements RmicAdapter { | |||||
} | } | ||||
if (attributes.getIncludejavaruntime()) { | if (attributes.getIncludejavaruntime()) { | ||||
// XXX move this stuff to a separate class, code is identical to | |||||
// code in ../compiler/DefaultCompilerAdapter | |||||
if (System.getProperty("java.vendor").toLowerCase().indexOf("microsoft") >= 0) { | if (System.getProperty("java.vendor").toLowerCase().indexOf("microsoft") >= 0) { | ||||
// Pull in *.zip from packages directory | // Pull in *.zip from packages directory | ||||
FileSet msZipFiles = new FileSet(); | FileSet msZipFiles = new FileSet(); | ||||
@@ -176,6 +179,18 @@ public abstract class DefaultRmicAdapter implements RmicAdapter { | |||||
+ File.separator +"jre" | + File.separator +"jre" | ||||
+ File.separator + "lib" | + File.separator + "lib" | ||||
+ File.separator + "rt.jar")); | + File.separator + "rt.jar")); | ||||
// Added for MacOS X | |||||
classpath.addExisting(new Path(null, | |||||
System.getProperty("java.home") | |||||
+ File.separator + ".." | |||||
+ File.separator + "Classes" | |||||
+ File.separator + "classes.jar")); | |||||
classpath.addExisting(new Path(null, | |||||
System.getProperty("java.home") | |||||
+ File.separator + ".." | |||||
+ File.separator + "Classes" | |||||
+ File.separator + "ui.jar")); | |||||
} | } | ||||
} | } | ||||
return classpath; | return classpath; | ||||