ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Holanda" <...@atlantico.com.br>
Subject ant 1.5.1 problem on ant.bat
Date Fri, 28 Feb 2003 18:08:49 GMT
I was using an 1.5 successfully. When I updated to ant 1.5.1 it was
returning the error:

Exception in thread "main" java.lang.NoClassDefFoundError: de

This error is caused by the weird form that windows use to store long names
and entries with blank spaces in its filesystem. So, if you have any
reference to "Program Files" in your path enviroment variables, it will
cause this error.
This error can be fixed by two diferent solutions:

Solution 1. Edit the file ant.bat (the best one in my opinion).
locate the line which contains:

if exist "%JAVA_HOME%\lib\tools.jar" call "%ANT_HOME%\bin\lcp.bat"
"%JAVA_HOME%\lib\tools.jar"

and remove the double quotes in the last parameter. The line shoud looklike
this:

if exist "%JAVA_HOME%\lib\tools.jar" call "%ANT_HOME%\bin\lcp.bat"
%JAVA_HOME%\lib\tools.jar

Solution 2. Check your path enviroment variable. It cannot contain any blank
space (like "Programa Files"). Use the ugly windows abreviated form instead
(e.g. "progra~1") inherited since the pure DOS old times. Check also for
references in this environment variables.

I'm posting this error because I did't find it in the ant FAQ, problems or
in the user@ant.apache.org mail archives.


Best regards,
Leonardo Holanda.



Mime
View raw message