Brendan Miller wrote:
<target name="run" depends="publish">
        <java jar="${files.publish.jar}"
              fork="true"
              />
    </target>

Gives me:
[java] Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/log4j/Logger

but
java -jar the_same_jar.jar
works fine.

I specify the path to log4j.jar as Class-Path: log4j.jar in the manifest.

What could be happening here?

How is jar lookup different between java -jar and <java jar=.../> ?

run ant in -verbose mode and you should see what Ant execs for a fork. It may also be that the directory that is used as a base for the java program is different, so that path isnt being picked up


--
Steve Loughran                  http://www.1060.org/blogxter/publish/5
Author: Ant in Action           http://antbook.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to