ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Todd Wilson <>
Subject Re: Using Main-Class and Class-Path in a manifest file
Date Tue, 12 Mar 2002 22:04:55 GMT
Thanks for your response, Ylan.  That is, indeed, a space.  The JAR spec 
dictates that individual paths need to be separated by one or more 
spaces (see for 
more info), so in our case we're designating the current directory as 
the first path to search, and ./lib/log4j.jar as the second.  We 
actually did try removing that period and space to see if it made a 
difference, and, unfortunately, it doesn't.

In regard to your observation related to log4j, you might notice in the 
source code in the main method that we're being lazy and simply 
initializing log4j with


rather than bothering with a configuration file.


Ylan Segal wrote:

> I am not to familiar with your problem, but this just jumped at me:
>>     <!-- Put everything in ${build} into the HelloWorld.jar file -->
>>     <jar jarfile="${dist}/HelloWorld.jar" basedir="${build}">
>>       <manifest>
>>         <attribute name="Class-Path" value=". ./lib/log4j.jar"/>
>                                                 ^
>                                                 ^----- Is this a space?
>>         <attribute name="Main-Class" value="HelloWorld"/>
>>       </manifest>
>>     </jar>
>>   </target>
> And Another thing, in your code, there is no configuration
> options for log4j (like appenders and stuff), so either you have to have a
> or log4j.xml in your classpath as well. But all that is
> really not related to ant.
> Hope this helps.
> Ylan Segal.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message