You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bo...@apache.org on 2002/05/28 11:01:34 UTC
cvs commit: jakarta-ant/src/main/org/apache/tools/ant/util JavaEnvUtils.java
bodewig 02/05/28 02:01:34
Modified: src/main/org/apache/tools/ant/util Tag: ANT_15_BRANCH
JavaEnvUtils.java
Log:
change discovery algorithm for JRE/JDK executables on AIX to try sh
dirs before bin dirs.
PR: 9287
Revision Changes Path
No revision
No revision
1.3.2.2 +12 -4 jakarta-ant/src/main/org/apache/tools/ant/util/JavaEnvUtils.java
Index: JavaEnvUtils.java
===================================================================
RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/util/JavaEnvUtils.java,v
retrieving revision 1.3.2.1
retrieving revision 1.3.2.2
diff -u -r1.3.2.1 -r1.3.2.2
--- JavaEnvUtils.java 22 May 2002 09:07:15 -0000 1.3.2.1
+++ JavaEnvUtils.java 28 May 2002 09:01:33 -0000 1.3.2.2
@@ -164,14 +164,18 @@
return command;
}
- File jExecutable = findInDir(javaHome + "/bin", command);
+ File jExecutable = null;
- if (jExecutable == null && isAix) {
+ if (isAix) {
// On IBM's JDK 1.2 the directory layout is different, 1.3 follows
// Sun's layout.
jExecutable = findInDir(javaHome + "/sh", command);
}
+ if (jExecutable == null) {
+ jExecutable = findInDir(javaHome + "/bin", command);
+ }
+
if (jExecutable != null) {
return jExecutable.getAbsolutePath();
} else {
@@ -200,12 +204,16 @@
return command;
}
- File jExecutable = findInDir(javaHome + "/../bin", command);
+ File jExecutable = null;
- if (jExecutable == null && isAix) {
+ if (isAix) {
// On IBM's JDK 1.2 the directory layout is different, 1.3 follows
// Sun's layout.
jExecutable = findInDir(javaHome + "/../sh", command);
+ }
+
+ if (jExecutable == null) {
+ jExecutable = findInDir(javaHome + "/../bin", command);
}
if (jExecutable != null) {
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>