I had this problem, too. And it seems that the very early downloads of the 1.4.0 jdk have ant.jar in the jre/lib/ext directory. Upon moving it out, everything worked fine. This was both on RH Linux 7.1 and Solaris 8
Stephen ----- Original Message ----- From: "Douglas R. Donahue" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, March 19, 2002 3:04 PM Subject: classic vs. modern compiler error > Greetings, > > This should be one for the ant FAQ. I had installed ant, it worked, and life > was good. I did a bunch of (what normally would have been inocuous changes > to the workstation, in order to sync the CLASSPATH and the filesystem. > Also, I had installed some stuff, etc. After such, I went back to developer > work, and Ant was no long functional. The output can be viewed at the end of > this suggestion. I did all of the JAVA_HOME/tools.jar stuff to make it work, > however, Ant still failed, even when all of the JAVA_HOME/tools.jar stuff > was good. It took me quite some time to track down the problem, which seems > rather trivail. However, the problem, is that I added a hard link in > ~jdk/lib/ext for ant.jar. > > i.e. $ ln ~antHome/lib/ant.jar ~jdk/lib/ext/ant.jar > > After removing the link (or copy) the Ant again began to work. An addition > should be made to the Ant FAQ which states that such will make Ant fail with > the "dreaded classic compiler error" and should (probably) not be avoided! > > Cheers, > > Doug Donahue > [EMAIL PROTECTED] > > odoncaoa@KILARNEY$ ant compile > Buildfile: build.xml > > compile: > [javac] Modern compiler is not available - using classic compiler > [javac] Compiling 1 source file to > C:\local\odoncaoa\Devel\Odoncaoa\Java\GenCDoc\classes > > BUILD FAILED > > c:\local\odoncaoa\Devel\Odoncaoa\Java\GenCDoc\src\build.xml:31: Cannot use > classic compiler, as it is not available A common solution is to set the > environment variable JAVA_HOME to your jdk directory. > > at org.apache.tools.ant.taskdefs.compilers.Javac12.execute(Javac12.java:96) > at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:557) > at org.apache.tools.ant.Task.perform(Task.java:217) > at org.apache.tools.ant.Target.execute(Target.java:184) > at org.apache.tools.ant.Target.performTasks(Target.java:202) > at org.apache.tools.ant.Project.executeTarget(Project.java:601) > at org.apache.tools.ant.Project.executeTargets(Project.java:560) > at org.apache.tools.ant.Main.runBuild(Main.java:454) > at org.apache.tools.ant.Main.start(Main.java:153) > at org.apache.tools.ant.Main.main(Main.java:176) > > Total time: 3 seconds > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
