[My Blog]
All roads lead to JavaRanch
Christophe Verré wrote:Ant cannot find log4j's library. You have to set the classpath dependencies in your build.xml. Check this tutorial (Using external libraries).
Christophe Verré wrote:Where is your manifest file ? What does it contain ?
Campbell Ritchie wrote:Welcome to the Ranch I see this thread has been (correctly) moved to the "ANT" forum.
Christophe Verré wrote:You still have to set the dependency in your MANIFEST file. Try to use this instead :
[My Blog]
All roads lead to JavaRanch
Christophe Verré wrote:Try "java classname="${Main-class}" fork="true"" instead of "java jar="${build.lib}/${Main-class}.jar" fork="true"".
It would be so much simplier if you kept the log4j JAR outside of your own JAR Do you need to put it inside ?
Raymond Tong wrote:Because your log4j jar is located in C:\test
Execute C:\Java\jdk1.6.0_21\bin>java.exe -jar C:\test\Test.jar
would not include the log4j libaray
Execute C:\test>java -jar Test.jar
would do because the log4j library is on the current path "C:\test"
Martijn Verburg wrote:Hi Yancy,
Just so you know it's really not recommended to put 3rd party JARs in the JRE folders, they should be kept elsewhere and referenced as needed .
Create symphonies in seed and soil. For this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|