ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Don Taylor <donald_l_taylor...@yahoo.com>
Subject RE: Problem with classpath - newbie
Date Thu, 11 Oct 2001 19:32:01 GMT
Ah yes! The ol' fork="yes" problem. I'm so used to setting it out of
habit I didn't notice you hadn't.

-- Don

--- Kalyan Dasika <Kalyan.Dasika@silverline.com> wrote:
> Wow! it works... 
> 
> it did not work without fork="yes" though..
> 
> Thanks a lot Don and Diane for your time.
> 
> The target looks like this now..
> 
> 	<target name="executesrc" depends="compilesrc,compiletests"
> if="junit.present">
> 		<java fork="yes" classname="com.test.HelloWorld">
> 			<classpath>
> 				<pathelement
> location="${build.jarpath}/${app.name}.jar"/>
> 			</classpath>
> 		</java>
> 	</target>
> 
> Regards,
> Kalyan
> 
> -----Original Message-----
> From: Diane Holt [mailto:holtdl@yahoo.com]
> Sent: Thursday, October 11, 2001 11:02 AM
> To: ant-user@jakarta.apache.org
> Subject: RE: Problem with classpath - newbie
> 
> 
> The way you originally had it should be fine -- not sure why you have
> the
> empty <pathelement path=""/> or why you're including
> ${java.class.path}
> if
> you're not forking, but the one pointing to your jar-file using
> location
> should work. Assuming the properties you're referencing are resolving
> to
> the right things, you should be able to just have:
>  
> <java classname="com.test.HelloWorld">
>   <classpath>
>     <pathelement location="${build.jarpath}/${app.name}.jar"/>
>   </classpath>
> </java>
> 
> You might want to try running it with fork="yes" and -verbose to see
> what
> that looks like.
> 
> Diane
> 
> --- Kalyan Dasika <Kalyan.Dasika@silverline.com> wrote:
> > This is what i have done,
> > 
> > 	<target name="executesrc" depends="compilesrc,compiletests"
> > if="junit.present">
> > 		<java classname="com.test.HelloWorld">
> > 			<classpath>
> > 				<fileset dir="${build.jarpath}">
> > 				    <include name="${app.name}.jar" />
> > 				</fileset>
> > 				<pathelement path="" />
> > 				<pathelement path="${java.class.path}"
> > />			
> > 			</classpath>
> > 		</java>
> > 	</target>
> > 
> > 
> > before it was
> > 
> > 	<target name="executesrc" depends="compilesrc,compiletests"
> > if="junit.present">
> > 		<java classname="com.test.HelloWorld">
> > 			<classpath>
> > 				<pathelement
> > location="${build.jarpath}/${app.name}.jar" />
> > 				<pathelement path="" />
> > 				<pathelement path="${java.class.path}"
> > />			
> > 			</classpath>
> > 		</java>
> > 	</target>
> > 
> > - Kalyan
> > 
> > -----Original Message-----
> > From: Don Taylor [mailto:donald_l_taylor_jr@yahoo.com]
> > Sent: Thursday, October 11, 2001 9:32 AM
> > To: ant-user@jakarta.apache.org
> > Subject: RE: Problem with classpath - newbie
> > 
> > 
> > You need to make sure the <fileset> element is directly under the
> > <classpath> element. If you can't get that to work then send a
> snippet
> > of the build file you tried.
> > 
> > -- Don
> > 
> > --- Kalyan Dasika <Kalyan.Dasika@silverline.com> wrote:
> > > No luck..
> > > 
> > > This is the error message that i get...
> > > 
> > > BUILD FAILED
> > > 
> > > build.xml:32: Class class org.apache.tools.ant.Path doesn't
> support
> > > the
> > > nested "
> > > fileset" element
> > > 
> > > - Kalyan
> > > 
> > > -----Original Message-----
> > > From: Don Taylor [mailto:donald_l_taylor_jr@yahoo.com]
> > > Sent: Thursday, October 11, 2001 5:35 AM
> > > To: ant-user@jakarta.apache.org
> > > Subject: Re: Problem with classpath - newbie
> > > 
> > > 
> > > Try replacing
> > > 
> > > <pathelement location="${build.jarpath}/${app.name}.jar" />
> > > 
> > > with 
> > > 
> > > <fileset dir="${build.jarpath}">
> > >     <include name="${app.name}.jar" />
> > > </fileset>
> > > 
> > > -- Don
> > > 
> > > --- Kalyan Dasika <Kalyan.Dasika@silverline.com> wrote:
> > > > Hi,
> > > > I have a classpath problem... 
> > > > 
> > > > This is a error part of the messages that i get when i run, ant
> > > > -verbose
> > > > from the command line.
> > > > 
> > > >      [java] Calling com.test.HelloWorld
> > > >      [java] Java args: []
> > > > 
> > > > BUILD FAILED
> > > > 
> > > > build.xml:30: Could not find com.test.HelloWorld. Make sure you
> > > have
> > > > it
> > > > in your
> > > > classpath
> > > > 
> > > > 
> > > > The target in the build.xml that i am using which executes the
> > > above
> > > > class.
> > > > 
> > > > 	<target name="executesrc" depends="compilesrc,compiletests"
> > > > if="junit.present">
> > > > 		<java classname="com.test.HelloWorld">
> > > > 			<classpath>
> > > > 				<pathelement
> > > > location="${build.jarpath}/${app.name}.jar" />
> > > > 				<pathelement path="" />
> > > > 				<pathelement path="${java.class.path}"
> > > > />			
> > > > 			</classpath>
> > > > 		</java>
> > > > 	</target>
> > > > 
> > > > I have the class, com.test.HelloWorld in the jar file which i
> had
> > > set
> > > > in
> > > > the classpath of the build.xml
> > > > 
> > > > Due to some reason the jar file is not being set in the
> classpath..
> > > > is
> > > > there any else that i need to do? Could some one give
> suggestions?
> > > > 
> > > > Regards,
> > > > Kalyan
> > > 
> > > 
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Make a great connection at Yahoo! Personals.
> > > http://personals.yahoo.com
> > 
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Make a great connection at Yahoo! Personals.
> > http://personals.yahoo.com
> 
> 
> =====
> (holtdl@yahoo.com)
> 
=== message truncated ===


__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com

Mime
View raw message