Browse Source

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.


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@267758 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 25 years ago
parent
commit
ee9dbf0892
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      src/main/org/apache/tools/ant/taskdefs/Javac.java

+ 7
- 0
src/main/org/apache/tools/ant/taskdefs/Javac.java View File

@@ -548,6 +548,13 @@ public class Javac extends MatchingTask {
*/

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();


Loading…
Cancel
Save