DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8511>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8511 Misleading error message in javac12.java Summary: Misleading error message in javac12.java Product: Ant Version: 1.4.1 Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: Core tasks AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] The Xerces-2.0.1 distribution coms with a build.bat which calls ant without the ant wrapper script (linewraps by me, a few lines deleted): rem Keep this classpath to the minimum required to run ant set LOCALCLASSPATH=%JAVA_HOME%\lib\tools.jar;\ %JAVA_HOME%\lib\classes.zip;.\tools\ant.jar;.\tools\xerces.jar "%JAVA_HOME%\bin\java.exe" -Dant.home="./tools" \ -classpath "%LOCALCLASSPATH%" org.apache.tools.ant.Main %1 %2 %3 %4 %5 Because the distribution does not include an ant.jar, I had to edit the LOCALCLASSPATH. While doing so, I generously deleted not only %JAVA_HOME%\lib\classes.zip but also %JAVA_HOME%\lib\tools.jar. This leads to the complaint: compile: [javac] Modern compiler is not available - using classic compiler [javac] Compiling 620 source files to C:\usr\pietsch\gnu\xerces-2_0_1\build\classes BUILD FAILED C:\usr\pietsch\gnu\xerces-2_0_1\build.xml:181: Cannot use classic compiler, as it is not available A common solution is to set the environment variable JAVA_HOME to your jdk directory. This is misleading in this case. The message, generated in javac12.java if there is a ClassNotFound exception while loading the main compiler class, seems to boldly assume that ant has been called using the wrapper script. I suggest to improve the message for the sake of projects like Xerces, for example by checking whether ${java.home}/lib/tools.jar is really an existing file and on the classpath. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
