ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pritesh saharey <>
Subject Re: Classpath in Java task
Date Thu, 13 Mar 2003 04:41:44 GMT
try using this,after your project tag write like this 
<project name="abc" default="compile"...>
<path id="classpath">
		<fileset dir="../lib">
			<include name="*.jar"/>
<java append="true" fork="true" failonerror="true" classpathref="classpath"
			<arg line="-f .."/>
hope this will solve your problem

--- "John Guthrie" <> wrote:
>i am writing a task that wraps a java routine. my (squonking good) copy of
>'java development with ant' gives an example of this (p. 491). so in my task
>i create a Java object in my execute() and try to use that
>problem is that i set the classpath based on the task settings and, when i
>run it, i get a NoClassDefException on a class that is in the rt.jar. if i
>add the jre's rt.jar to the classpath it works (well, it fails in a
>different place, and that's progress).
>so my question is how do i get the rt.jar into my Java object's classpath?
>is there a way to get the classpath that is in my task and pass that on to
>the Java task (along with that the user specified), and/or is that even a
>good idea?
>To unsubscribe, e-mail:
>For additional commands, e-mail:

Join Community  --->

Select your own custom email address for FREE! Get w/No Ads, 6MB, POP &

View raw message