Jump to content
We've recently updated our Privacy Statement, available here ×

Unable to use compile target in build.xml


Recommended Posts

By: Mark Hayes - markh46

Unable to use compile target in build.xml

2003-04-06 23:53

JR 0.4.5

Ant 1.5.2

SDK 1.3.1_07

 

When I attempt to use the <compile> target for the query sample I get:

java.lang.NoClassDefFoundError: org/xml/sax/helpers/DefaultHandler

 

I have tried everything I can think to track this down. If I invoke QueryApp from the command line, setting -classpath to the jar's in the JR lib directory, it works.

 

This fails:

 

<target name="compile">

<java classname="QueryApp" fork="true">

<sysproperty key="org.xml.sax.driver" value="org.apache.xerces.parsers.SAXParser"/>

<arg value="-Tcompile"/>

<arg value="-FQueryReport.xml"/>

<classpath>

<pathelement location="./"/>

<pathelement location="../../../classes"/>

<fileset dir="../../../lib">

<include name="**/*.jar"/>

</fileset>

</classpath>

</java>

</target>

 

 

But this works:

 

java -classpath .;......libtools.jar;......classes;......libxercesImpl.jar;......libxmlParserAPIs.jar;......libcommons-digester.jar;......libcommons-collections.jar;......libcommons-logging.jar;......libcommons-beanutils.jar -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser QueryApp -Tcompile -FQueryReport.xml

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...