Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 85754 invoked from network); 22 May 2008 17:02:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 May 2008 17:02:55 -0000 Received: (qmail 48577 invoked by uid 500); 22 May 2008 17:02:53 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 48391 invoked by uid 500); 22 May 2008 17:02:52 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 48380 invoked by uid 99); 22 May 2008 17:02:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 May 2008 10:02:52 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of peter.kitt.reilly@gmail.com designates 74.125.46.157 as permitted sender) Received: from [74.125.46.157] (HELO yw-out-1718.google.com) (74.125.46.157) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 May 2008 17:02:06 +0000 Received: by yw-out-1718.google.com with SMTP id 9so87747ywk.70 for ; Thu, 22 May 2008 10:02:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=Bjc8CiW7+2hiFlfng3KRKWEWWI2eINtK7bFdoi2J/cw=; b=BUo9UnUOF+npLUlaxVCxNLAc1WYei62wBFptCZwku8Zx07Hq6zwhDm+T9WEslLcl+yiy1iWV+nE5osqttKwwuk7ptZFOz+qlNm4ttt6TY0HQmOuXO73RLKicz/njjcMSPTJVWs2r/2gpdsRveJOOyfHneXHOZUIeur5oPmB/EkI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Cq3NVVK6R4rCM/e1LdP8OwaqHCIYHdW1Vn9dIFA2sHOKw9s6HHVWU6hyvZVBmGkUelmt6YevKBHr815aKsH7OOk86XRwu7uLsPuzcs6C8pm+HdZx/3wEw4MMqAH/Vx3D0E1Cjd35CJVtD0xATcUs5ZZlpeUIU+XbGyT4USNn0nw= Received: by 10.142.134.20 with SMTP id h20mr112413wfd.188.1211475735497; Thu, 22 May 2008 10:02:15 -0700 (PDT) Received: by 10.142.144.1 with HTTP; Thu, 22 May 2008 10:02:15 -0700 (PDT) Message-ID: Date: Thu, 22 May 2008 18:02:15 +0100 From: "Peter Reilly" To: "Ant Users List" Subject: Re: Class-Path not recognised from MANIFEST.MF In-Reply-To: <7106C04C5CF9AA43B6B278F2C24FFF27029D96E4@AD1HFDEXC305.ad1.prod> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <246bcc580805220829n19f34ca9jc8a1f1fcf1601c04@mail.gmail.com> <7106C04C5CF9AA43B6B278F2C24FFF27029D96E3@AD1HFDEXC305.ad1.prod> <246bcc580805220903y25ace98bu9580604644ea0b90@mail.gmail.com> <7106C04C5CF9AA43B6B278F2C24FFF27029D96E4@AD1HFDEXC305.ad1.prod> X-Virus-Checked: Checked by ClamAV on apache.org On Thu, May 22, 2008 at 5:42 PM, Toomey, Kevin H (ATS, IT) wrote: > "What about a application which needs multiple jar files on its > classpath, does all these files (dependencies) needs to be specified > using the -classpath attribute on command line" > > Yes. > Not quite. The Class-path attribute in a jar manifest is used to specific relative or absolute files that are to be added to the classpath when one uses java -jar. The filenames are relative to the jar file. so having Class-path: App1.jar in the manifest of X.jar, and placing App1.jar and X.jar in /opt/testing/X one can do java -jar /opt/testing/X/X.jar, and App1.jar will be picked up. Peter > Do a search on "executable jar file dependencies" and you'll come across > many articles and forum entries relating to this. You are not the first > who expected to be able to do what you are trying to do. > > Thanks, > Kevin > > -----Original Message----- > From: Ravi Roy [mailto:ravi.aroy@gmail.com] > Sent: Thursday, May 22, 2008 12:04 PM > To: Ant Users List > Subject: Re: Class-Path not recognised from MANIFEST.MF > > Thanks Kevin and Dominique for your quick replies, > > Yes. Exception is for a class in the App1.jar which is needed by > Application.jar (main application file). What about a application which > needs multiple jar files on its classpath, does all these files > (dependencies) needs to be specified using the -classpath attribute on > command line .. There is no other way ? > > Dominique : App1.jar is included in root of Application.jar so it is > physical file itself in the Application.jar ? > Regards, > Ravi > > On Thu, May 22, 2008 at 9:20 PM, Toomey, Kevin H (ATS, IT) > wrote: >> Hi Ravi, >> >> I'm assuming the exception is for a class in the App1.jar file. >> That's because (unfortunately) jar files can't read jar files >> contained within them. You need to place App1.jar on the file system >> and include it in your command to your executable jar file. >> >> Ex. java -classpath App1.jar -jar Application.jar >> >> Thanks, >> Kevin >> >> -----Original Message----- >> From: Ravi Roy [mailto:ravi.aroy@gmail.com] >> Sent: Thursday, May 22, 2008 11:29 AM >> To: Ant Users List >> Subject: Class-Path not recognised from MANIFEST.MF >> >> Hi All, >> >> My apologies if I am missing something obivious, I have the following >> test build.xml, in which I am trying to create a executable JAR, I am >> specifying the Class-Path which is needed by the application at >> runtime but application reports NoClassDefFound error... >> >> Class-Path and Main-Class attribute are fine the Manifest.MF.. But >> looked very strange that is come with NoClassDefFoundError.. >> >> Does soembody knows the clue what is wrong ? >> >> Thanks in advance. >> >> Regards, >> Ravi. >> >> >> >> >> > destfile="Application.jar" manifest="manifest.mf" update="false"> >> >> >> >> >> >> >> >> >> >> > /> >> >> >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional > >> commands, e-mail: user-help@ant.apache.org >> >> >> >> ********************************************************************** >> *** This communication, including attachments, is for the exclusive >> use of addressee and may contain proprietary, confidential and/or >> privileged information. If you are not the intended recipient, any >> use, copying, disclosure, dissemination or distribution is strictly >> prohibited. If you are not the intended recipient, please notify the >> sender immediately by return e-mail, delete this communication and >> destroy all copies. >> ********************************************************************** >> *** >> >> >> --------------------------------------------------------------------- >> 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 > > > > ************************************************************************* > This communication, including attachments, is > for the exclusive use of addressee and may contain proprietary, > confidential and/or privileged information. If you are not the intended > recipient, any use, copying, disclosure, dissemination or distribution is > strictly prohibited. If you are not the intended recipient, please notify > the sender immediately by return e-mail, delete this communication and > destroy all copies. > ************************************************************************* > > > --------------------------------------------------------------------- > 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