ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Conor MacNeill <>
Subject Re: problem using ant with win2000 and Jdk 1.4-
Date Tue, 25 Mar 2003 04:24:38 GMT
On Tue, 25 Mar 2003 03:20 pm, Rajat wrote:
> Thanks to all for the help..the problem is now solved.
> Ant was giving the error "NoClassDefFoundError: Tomcat"
> because my classpath has a entry like this
> Classpath:
> .;G:\dp5\WIBProvisioning\samApi.jar;E:\j2sdkee1.3.1\lib\j2ee.jar;"G:\Apache
> Tomcat 4.0\common\lib\servlet.jar";
> After I removed the last entry(servlet.jar)from classpath it is working
> fine. But I'm still not able to understand the logic behind this..
> Was it due to the double quotes and space in classpath ????

Yes, it is due to the double quotes. You do not need double quotes to define a 
classpath with spaces. You only need quotes when you use that classpath value 
in a command line. This is what ant.bat does. It quotes the classpath in case 
it contains spaces. If your CLASSPATH variable contains quotes, the 
additional quoting will break things. You example above would become

".;G:\....;"C:\Apache Tomcat 4.0\...";"

So the command line that actually gets passed to Java looks like you are 
trying to run the Tomcat class with an argument starting with "4.0\"

Conor MacNeill

View raw message