ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Holmqvist, IT, Posten" <>
Subject Problem with the java task
Date Mon, 21 Oct 2002 14:56:26 GMT

I have a problem with this small snipe of ant:

 <target name="execute" depends="execute_init">
    <java jar="${jar_file}" fork="true">
      <arg value="${prop_file}"/>

The deal is that in the manifest file for the jar is a classpath set that
sets up 3 other jar files that is located in the same directory as the
exectued jar file like this:

Manifest-Version: 1.0
Main-Class: se.posten.logistik.applications.taxering.customs.DPDCustoms
Class-Path: xerces-1.3.jar common.jar business.jar

If I exectue the jar with 
java -jar <jar_file> <prop_file>
everythign works as expected but from ant I get a classloader exception when
trying to load the defaulthandler (for xml)
java.lang.NoClassDefFoundError: org/xml/sax/helpers/DefaultHandler that is
located in the xerces-1.3.jar file.

I can't figure out what the deal is so if anyone have any input ... :-)

Cheers Christian

Some information:
/cygdrive/c/bin $ java -version
java version "1.3.1_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_04-b02)
Java HotSpot(TM) Client VM (build 1.3.1_04-b02, mixed mode)
Alla Mon Oct 21,16:54:41
/cygdrive/c/bin $ ant -version
Apache Ant version 1.5 compiled on July 9 2002
Alla Mon Oct 21,16:54:45

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

View raw message