bodewig     2004/04/21 00:18:49

  Modified:    .        WHATSNEW
               src/main/org/apache/tools/ant/launch Locator.java
  Log:
  don't depend on jre being lowercase, PR: 25798
  
  Revision  Changes    Path
  1.593     +3 -0      ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/ant/WHATSNEW,v
  retrieving revision 1.592
  retrieving revision 1.593
  diff -u -r1.592 -r1.593
  --- WHATSNEW  20 Apr 2004 21:39:28 -0000      1.592
  +++ WHATSNEW  21 Apr 2004 07:18:48 -0000      1.593
  @@ -122,6 +122,9 @@
   * AntClassLoader#getResource could return invalid URLs.  Bugzilla
     Report 28060.
   
  +* Ant failed to locate tools.jar if the jre directory name wasn't all
  +  lowercase.  Bugzilla Report 25798.
  +
   Other changes:
   --------------
   
  
  
  
  1.14      +2 -1      ant/src/main/org/apache/tools/ant/launch/Locator.java
  
  Index: Locator.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/launch/Locator.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- Locator.java      5 Apr 2004 21:26:45 -0000       1.13
  +++ Locator.java      21 Apr 2004 07:18:48 -0000      1.14
  @@ -23,6 +23,7 @@
   import java.io.FilenameFilter;
   import java.text.CharacterIterator;
   import java.text.StringCharacterIterator;
  +import java.util.Locale;
   
   /**
    * The Locator is a utility class which is used to find certain items
  @@ -181,7 +182,7 @@
           // couldn't find compiler - try to find tools.jar
           // based on java.home setting
           String javaHome = System.getProperty("java.home");
  -        if (javaHome.endsWith("jre")) {
  +        if (javaHome.toLowerCase(Locale.US).endsWith("jre")) {
               javaHome = javaHome.substring(0, javaHome.length() - 4);
           }
           File toolsJar = new File(javaHome + "/lib/tools.jar");
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to