From dev-return-84262-apmail-ant-dev-archive=ant.apache.org@ant.apache.org Tue Jun 23 17:40:40 2009 Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 54000 invoked from network); 23 Jun 2009 17:40:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Jun 2009 17:40:40 -0000 Received: (qmail 68938 invoked by uid 500); 23 Jun 2009 17:40:50 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 68838 invoked by uid 500); 23 Jun 2009 17:40:50 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 68828 invoked by uid 99); 23 Jun 2009 17:40:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Jun 2009 17:40:50 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of garima.bathla@gmail.com designates 209.85.222.182 as permitted sender) Received: from [209.85.222.182] (HELO mail-pz0-f182.google.com) (209.85.222.182) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Jun 2009 17:40:39 +0000 Received: by pzk12 with SMTP id 12so159380pzk.14 for ; Tue, 23 Jun 2009 10:40:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=b2zcmmqGPWy9tnPinPaZR2usIrdWdjX/JkuY85xtRYw=; b=C3Asr0CCUc8rwJIoVoxgTRcFHiVI+Th4ZmDujoS0trVavF27o/CHihF4k1Kcmkshl0 wrAT9EkWzf1Z2w3Idn5uP0KNKBGQ0YdUplHo823ZF8/zU4UMUuEYVxUJaOIeen2F86PL rMdUO8VkTjHqqQMIPnCgse3gbsGa5tXPdCkuk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=X1d6h1Gf10FVDYTVFebN7mBMnZekY3L18WxJuZ03H9gBoZP50sg+fFFhJqO6hb0TeI Zhq2AbjVo+OiuP0pGH31CJb6fe2W3KEpNHbEUQNexC61k7qh5Q59w24w4GwLeXbuk0LQ 64/HPEIoGqpgKGUCZYTfZKYvS2NWiiFRPmNuQ= MIME-Version: 1.0 Received: by 10.115.54.7 with SMTP id g7mr438115wak.86.1245778817881; Tue, 23 Jun 2009 10:40:17 -0700 (PDT) In-Reply-To: <255d8d690906221247w67244271lab198cdf11ef1e3f@mail.gmail.com> References: <1fb30820906212233o7df5d40ak73cf868da47bfc4@mail.gmail.com> <255d8d690906220710l18d9faecn50537553e741acde@mail.gmail.com> <1fb30820906220958p446f18d2qfc7b88e5e4b16c61@mail.gmail.com> <255d8d690906221247w67244271lab198cdf11ef1e3f@mail.gmail.com> Date: Tue, 23 Jun 2009 10:40:17 -0700 Message-ID: <1fb30820906231040u51321172j67a298027561dcf2@mail.gmail.com> Subject: Re: Manifest Classpath ( programmatically generated but messedup). From: Garima Bathla To: Ant Developers List Content-Type: multipart/alternative; boundary=001636457594e898e5046d077b3c X-Virus-Checked: Checked by ClamAV on apache.org --001636457594e898e5046d077b3c Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Thanks DD for your prompt reply, I am trying to set classpath for a standalone application and I am not able to figure out what exactly I am doing wrong. Below is the classpath that is being generated in the MANIFEST.MF And this isn't valid classpath , when I run java -jar mystandaloneapplication.jar, it cannot find any classes. Class-Path: aaa.jar bbb.jar ccc.jar ddd.jar eee.jar fff.jar ggg.jar hh h.jar iii.jar jjj.jar kkk.jar lll.jar mmm.jar nnn.jar ooo.jar ppp.jar qqq.jar rrr.jar sss.jar ttt.jar uuu.jar vvv.jar www.jar xxx.jar yyy. jar zzz.jar *Code Snippet:* jar.classpath.id = aaa.jar bbb.jar ccc.jar ddd.jar eee.jar fff.jar ggg.jar hhh.jar iii.jar jjj.jar kkk.jar lll.jar mmm.jar nnn.jar ooo.jar ppp.jar qqq.jar rrr.jar sss.jar ttt.jar uuu.jar vvv.jar www.jar xxx.jar yyy.jar zzz.jar How do I ensure that the class-path that is generated is valid and can be loaded when I run java -jar command? Is it possible that this can be a bug with long classpath's? I will really really appreciate some help on this. Regards, Garima On Mon, Jun 22, 2009 at 12:47 PM, Dominique Devienne wrote: > On Mon, Jun 22, 2009 at 11:58 AM, Garima Bathla > wrote: > > That exactly is what I am doing, using Ant's Manifest class. Problem > > happens to be that my classpath is too big and Manifest file has limit of > 72 > > characters per line, so even though it spits out my configured classpath > , > > it ain't set correctly (as I have listed in the orginial thread). > > > > Any help is highly appreciated, it must not be this tricky to set long > > classpaths programmatically? > > Manifest can break a CP longer than 72 char on several lines correctly, > using the proper rules, and has been doing it correctly for years. > > Very few bugs reported against it turned out to be real bugs in fact. > So I strongly suggest you take a second look, assuming it does the > correct thing. Note though that line breaks is only the beginning. > > The Class-Path: attribute also needs to use the proper file and path > separators, > be absolute or relative to the jar, and for this you should depend on > ManifestClasspath, > another Ant class that can take a Path and again format it correctly. --DD > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org > For additional commands, e-mail: dev-help@ant.apache.org > > --001636457594e898e5046d077b3c--