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 Tue, 11 Jul 2000 15:12:32 GMT
bodewig     00/07/11 08:12:31

  Modified:    src/main/org/apache/tools/ant/taskdefs Javac.java
  Log:
  Not all JDKs with version 1.3 have com.sun.tools.javac.Main. IBM's
  doesn't, so check and fall back to classic in this case.
  
  Revision  Changes    Path
  1.19      +7 -0      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.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- Javac.java	2000/07/06 16:48:15	1.18
  +++ Javac.java	2000/07/11 15:12:30	1.19
  @@ -548,6 +548,13 @@
        */
   
       private void doModernCompile() throws BuildException {
  +        try {
  +            Class.forName("com.sun.tools.javac.Main");
  +        } catch (ClassNotFoundException cnfe) {
  +            doClassicCompile();
  +            return;
  +        }
  +
           log("Using modern compiler", Project.MSG_VERBOSE);
           String classpath = getCompileClasspath(false);
           Vector argList = new Vector();
  
  
  

Mime
View raw message