ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/types Path.java
Date Thu, 14 Aug 2003 16:25:52 GMT
bodewig     2003/08/14 09:25:52

  Modified:    src/main/org/apache/tools/ant/types Path.java
  Log:
  Newer versions of Kaffe have a filesystem layout similar to Sun's VMs,
  don't exclude rt.jar and friends.
  
  PR: 22297
  
  Revision  Changes    Path
  1.57      +14 -8     ant/src/main/org/apache/tools/ant/types/Path.java
  
  Index: Path.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/types/Path.java,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- Path.java	13 Aug 2003 15:14:31 -0000	1.56
  +++ Path.java	14 Aug 2003 16:25:52 -0000	1.57
  @@ -603,6 +603,20 @@
        * Add the Java Runtime classes to this Path instance.
        */
       public void addJavaRuntime() {
  +        if ("Kaffe".equals(System.getProperty("java.vm.name"))) {
  +            // newer versions of Kaffe (1.1.1+) won't have this,
  +            // but this will be sorted by FileSet anyway.
  +            File kaffeShare = new File(System.getProperty("java.home")
  +                                       + File.separator + "share"
  +                                       + File.separator + "kaffe");
  +            if (kaffeShare.isDirectory()) {
  +                FileSet kaffeJarFiles = new FileSet();
  +                kaffeJarFiles.setDir(kaffeShare);
  +                kaffeJarFiles.setIncludes("*.jar");
  +                addFileset(kaffeJarFiles);
  +            }
  +        }
  +
           if (System.getProperty("java.vendor").toLowerCase(Locale.US).indexOf("microsoft")
>= 0) {
               // Pull in *.zip from packages directory
               FileSet msZipFiles = new FileSet();
  @@ -610,14 +624,6 @@
                   + File.separator + "Packages"));
               msZipFiles.setIncludes("*.ZIP");
               addFileset(msZipFiles);
  -        } else if ("Kaffe".equals(System.getProperty("java.vm.name"))) {
  -            FileSet kaffeJarFiles = new FileSet();
  -            kaffeJarFiles.setDir(new File(System.getProperty("java.home")
  -                                          + File.separator + "share"
  -                                          + File.separator + "kaffe"));
  -
  -            kaffeJarFiles.setIncludes("*.jar");
  -            addFileset(kaffeJarFiles);
           } else if (JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_1)) {
               addExisting(new Path(null,
                                    System.getProperty("java.home")
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message