Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 96815 invoked from network); 5 Oct 2009 14:27:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 5 Oct 2009 14:27:42 -0000 Received: (qmail 96908 invoked by uid 500); 5 Oct 2009 14:27:41 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 96851 invoked by uid 500); 5 Oct 2009 14:27:41 -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 96841 invoked by uid 99); 5 Oct 2009 14:27:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Oct 2009 14:27:41 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Oct 2009 14:27:31 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1MuoWs-0007ka-TC for user@ant.apache.org; Mon, 05 Oct 2009 07:27:10 -0700 Message-ID: <25751814.post@talk.nabble.com> Date: Mon, 5 Oct 2009 07:27:10 -0700 (PDT) From: not4google To: user@ant.apache.org Subject: Re: How to specify xml configuration file from Ant Task In-Reply-To: <4AC64C76.1040204@free.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Nabble-From: kapil.x.johri@jpmorgan.com References: <25714122.post@talk.nabble.com> <4AC64C76.1040204@free.fr> X-Virus-Checked: Checked by ClamAV on apache.org Hi here are some more details: =09 =09=09 =09=09 =09=09=09 =09=09=09 =09=09=09=09 =09=09=09=09 =09=09=09 =09=09 =09 As you can see I do copy the XML file to the JAR and have checked this and its definitely there.=20 The XML is called from the Java by the following: ApplicationContext ac =3D new ClassPathXmlApplicationContext("jdbc.xml", HelloWorld.class); Am not sure if its on the classpath - was hoping to have that done from the ant task if possible? supareno wrote: >=20 > not4google a =C3=A9crit : >> Hi all >> >> I have some code which relies on a xml configuration file being >> available. I >> have built my JAR from ant ANT task and after looking in the JAR i can >> see >> that the file is there.=20 >> >> However when I try and execute the JAR on Windows from the command line >> e.g. >> >> java -jar Test.jar I get an exception saying that the file could not be >> found. >> >> Please could someone give me some suggestions on how to resolve this? >> >> Thanks >> =20 > what about your build file? > can we see i? > did you copy the file in your jar? > is the xml file is in the classpath? > how do you call it in your java program? >=20 > if you don't give us more clues, we can't help you :-) >=20 > supareno >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org >=20 >=20 >=20 --=20 View this message in context: http://www.nabble.com/How-to-specify-xml-conf= iguration-file-from-Ant-Task-tp25714122p25751814.html Sent from the Ant - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org