ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pritesh saharey <prit...@sqatester.com>
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"/>
		</fileset>
</path>
<java append="true" fork="true" failonerror="true" classpathref="classpath"
			classname="org.apache.setClass">
			<arg line="-f .."/>
		</java>
</project>
hope this will solve your problem
pritesh

--- "John Guthrie" <jguthrie@psynapsetech.net> 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?
>
>thanks.
>
>---
>john
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org

_____________________________________________________________
Join SQAtester.com Community  ---> http://www.sqatester.com/testersarea/joinus.htm

_____________________________________________________________
Select your own custom email address for FREE! Get you@yourchoice.com w/No Ads, 6MB, POP &
more! http://www.everyone.net/selectmail?campaign=tag

Mime
View raw message