Top.Mail.Ru
August 23rd, 2006 - Java developers — LiveJournal
? ?

Java developers

August 23rd, 2006

03:26 pm - theycallmesir - stumped again

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?

04:40 pm - chris61182 - Thread Question

Here's a potentially dumb question, but it doesn't seem to be answered by the specification.

But which thread is supposed to be returned when you call Thread.currentThread() on a system with multiple processors/cores or SMT? The spec says that a reference to the currently executing thread is returned, but it doesn't say anything about when you have more than one executing.
Powered by LiveJournal.com