ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/util JavaEnvUtils.java
Date Tue, 28 May 2002 09:01:34 GMT
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:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message