|
I'm back in that ant build file from last week. I have 3 jar's within my jar and I'm trying to add the Class-Path attribute to the manifest. The jar file looks correct and the manifest looks correct, but I'm still getting class not found errors.
This is the build target
<target name="build" depends="compile, copy-files" description="Build client"> <jar compress="false" destfile="${jar.dir}/${client.app.name}"> <manifest> <attribute name="Class-Path" value="piccolo.jar piccolox.jar log4j.jar . "/> <attribute name="Main-Class" value="hcm.ManagerMainApplication"/> </manifest> <fileset dir="${javac.dir}"> <include name="**/*.*"/> <exclude name="package cache/"/> </fileset> <fileset dir="${client.lib.dir}"> <include name="**/*.jar"/> <exclude name="package cache/"/> </fileset>
</jar> </target>
This creates the manifest.mf that looks like this
Manifest-Version: 1.0 Ant-Version: Apache Ant 1.6.2 Created-By: 1.5.0_03-b07 (Sun Microsystems Inc.) Main-Class: hcm.ManagerMainApplication Class-Path: piccolo.jar piccolox.jar log4j.jar .
and the error I get is Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/apache/log4j/Logger
I've checked the log4j.jar and the Logger class does exist.
Any ideas? |