ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@locus.apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Javac.java
Date Wed, 12 Jul 2000 09:55:45 GMT
bodewig     00/07/12 02:55:44

  Modified:    src/main/org/apache/tools/ant/taskdefs Javac.java
  Log:
  Use the correct path to the runtime classes in JDK > 1.1.
  
  Submitted by:	Christopher Elkins <celkins@scardini.com>
  
  Revision  Changes    Path
  1.20      +28 -11    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javac.java
  
  Index: Javac.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javac.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- Javac.java	2000/07/11 15:12:30	1.19
  +++ Javac.java	2000/07/12 09:55:44	1.20
  @@ -140,10 +140,20 @@
        * @param srcDirName the name of the directory to add to the list of source directories.
        */
       private void addSrcDir(String srcDirName) {
  -        srcDirs.addElement(project.resolveFile(srcDirName));
  +        addSrcDir(project.resolveFile(srcDirName));
       }
   
       /**
  +     * Add a single directory to the collection of directories that
  +     * make up the source path.
  +     *
  +     * @param srcDir the directory to add to the list of source directories.
  +     */
  +    private void addSrcDir(File srcDir) {
  +        srcDirs.addElement(srcDir);
  +    }
  +
  +    /**
        * Add a set of source directories specified as path.
        *
        * @param srcPath the list of source directories.
  @@ -170,8 +180,8 @@
        * Set the destination directory into which the Java source
        * files should be compiled.
        */
  -    public void setDestdir(String destDirName) {
  -        destDir = project.resolveFile(destDirName);
  +    public void setDestdir(File destDir) {
  +        this.destDir = destDir;
       }
   
       /**
  @@ -200,22 +210,22 @@
       /**
        * Set the deprecation flag.
        */
  -    public void setDeprecation(String deprecationString) {
  -        this.deprecation = Project.toBoolean(deprecationString);
  +    public void setDeprecation(boolean deprecation) {
  +        this.deprecation = deprecation;
       }
   
       /**
        * Set the debug flag.
        */
  -    public void setDebug(String debugString) {
  -        this.debug = Project.toBoolean(debugString);
  +    public void setDebug(boolean debug) {
  +        this.debug = debug;
       }
   
       /**
        * Set the optimize flag.
        */
  -     public void setOptimize(String optimizeString) {
  -        this.optimize = Project.toBoolean(optimizeString);
  +     public void setOptimize(boolean optimize) {
  +         this.optimize = optimize;
        }
   
       /**
  @@ -229,8 +239,8 @@
       /**
        * Set the filtering flag.
        */
  -    public void setFiltering(String filter) {
  -        filtering = Project.toBoolean(filter);
  +    public void setFiltering(boolean filter) {
  +        filtering = filter;
       }
   
       /**
  @@ -402,6 +412,13 @@
                                          + File.separator + "lib"
                                          + File.separator + "classes.zip");
               } else {
  +                // JDK > 1.1 seems to set java.home to the JRE directory.
  +                addExistingToClasspath(classpath,
  +                                       System.getProperty("java.home")
  +                                       + File.separator + "lib"
  +                                       + File.separator + "rt.jar");
  +                // Just keep the old version as well and let addExistingToPath
  +                // sort it out.
                   addExistingToClasspath(classpath,
                                          System.getProperty("java.home")
                                          + File.separator +"jre"
  
  
  

Mime
View raw message