ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bala Paranj <bpar...@yahoo.com>
Subject Re: Specifying Jar files to execute program
Date Tue, 18 Jul 2006 19:59:37 GMT
Thank you Matt. I downloaded the latest snapshot of ant (ant_20060717163050.tar.gz 17-Jul-2006
09:31). I have extracted the zip file on the local hard drive. Is there a build.xml to compile
it?
 ;)

--- Matt Benson <gudnabrsam@yahoo.com> wrote:

> --- Bala Paranj <bparanj@yahoo.com> wrote:
> 
> > Thank you Dominique. Is there a custom task to set
> > the classpath in manifest file?
> 
> Actually, Dominique created a <manifestclasspath> task
> that will be included in Ant 1.7 .  You can use it now
> by building Ant from source.  Currently you would use
> the task separately, setting the classpath into a
> property, e.g. "mfcp", then specify
> 
> <attribute name="Class-Path" value="${mfcp}" />
> 
> in your <manifest>.  By the time Ant 1.7 is released,
> further work may have been done to allow
> <manifestclasspath> to be nested inside <manifest>.
> 
> -Matt
> 
> > 
> > --- Dominique Devienne <ddevienne@gmail.com> wrote:
> > 
> > > <classpath> is ignored when using 'jar' attribute,
> > as per Java's own
> > > document in the JDK. Ant's documentation has been
> > updated to more
> > > strongly indicate that.
> > > 
> > > Either use an in-Manifest Class-Path: attribute,
> > or use 'classname'
> > > instead of 'jar'. --DD
> > > 
> > > On 7/18/06, Bala Paranj <bparanj@yahoo.com> wrote:
> > > > I have the following target in my ant script:
> > > >
> > > > <target name="execute" depends="compile"
> > description="run the program">
> > > >
> > > >  <java jar="${dist}/myClient.jar" fork="true"
> > failonerror="true">
> > > >        <classpath>
> > > >          <pathelement
> > location="${dist}/abc.jar"/>
> > > >          <pathelement
> > location="${dist}/xyz.zip"/>
> > > >        </classpath>
> > > >        <sysproperty key="javax.net.ssl.keyStore"
> > value="client.keystore" />
> > > >        <sysproperty
> > key="javax.net.ssl.keyStorePassword"
> > value="lakjflkdj" />
> > > >        <sysproperty
> > key="javax.net.ssl.trustStore"
> > value="client.truststore" />
> > > >        <sysproperty
> > key="javax.net.ssl.trustStorePassword"
> > value="oiruqoieur" />
> > > >        <arg value="localhost" />
> > > >        <arg value="8443" />
> > > >  </java>
> > > >
> > > > </target>
> > > >
> > > > The abc.jar and xyz.zip are in the same
> > directory (dist) and so is the myClient.jar file
> > that
> > > I
> > > > want to run. But I get the
> > java.lang.NoClassDefFoundError: name of class in
> > abc.jar as the
> > > error
> > > > message.
> > > >
> > > > The dist folder and the ant script is within the
> > myProject folder. How can I fix this? TIA.
> > > >
> > > >
> >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > user-unsubscribe@ant.apache.org
> > > > For additional commands, e-mail:
> > user-help@ant.apache.org
> > > >
> > > >
> > > 
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > user-unsubscribe@ant.apache.org
> > > For additional commands, e-mail:
> > user-help@ant.apache.org
> > > 
> > > 
> > 
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > user-unsubscribe@ant.apache.org
> > For additional commands, e-mail:
> > user-help@ant.apache.org
> > 
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message