Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@jakarta.apache.org Received: (qmail 82703 invoked by uid 500); 15 May 2001 09:52:00 -0000 Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: ant-user@jakarta.apache.org Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 82687 invoked from network); 15 May 2001 09:51:58 -0000 Message-ID: <002601c0dd25$3aa64ec0$ebe4223f@cognetnt> From: "Conor MacNeill" To: References: <9B3E950CB293D411ADF4009027B0A4D201357514@maileu.imediation.com> Subject: Re: Java Resources and JUnit task Date: Tue, 15 May 2001 19:55:34 +1000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N Just to add a few minor points. The classloader has been fixed in CVS I should note that getSystemResource, however, has not been changed and should always have worked as the implementation is provided in java.lang.Classloader. If you are going to run a task, junit in this case, with a given classpath, then getSystemResource will, I presume, fall back to the system classpath in effect when you launched Ant. So, even with the fixed classloader, getSystemResource will probably still not work. In that case, you can either go over to the getResource method or continue to fork. Conor ----- Original Message ----- From: "Stephane Bailliez" To: Sent: Tuesday, May 15, 2001 6:28 PM Subject: RE: Java Resources and JUnit task getResource is not implemented in the AntClassLoader while getResourceAsStream is. It has already been reported. see http://nagoya.betaversion.org/bugzilla/show_bug.cgi?id=1440 Right now, as a workaround, you can set the JUnit task to fork="yes" Cheers, -- St�phane Bailliez Software Engineer, Paris - France iMediation - http://www.imediation.com Disclaimer: All the opinions expressed above are mine and not those from my company. > -----Original Message----- > From: Christopher Berry [mailto:christopher.berry@etrade.com] > Sent: Tuesday, May 15, 2001 12:53 AM > To: 'ant-user@jakarta.apache.org' > Subject: Java Resources and JUnit task > > > Greetings > I am attempting to read a System Resource (i.e. > ClassLoader.getSystemResource( resourceName ). Where resource name is > something like: "/config/proj.properties". I am trying to do > this in a JUnit > task. I don't know why, but the file is not found. (Although > I am certain > that it is in the Classpath). > Does anyone have any insight for me??? > > Thanks, > -- Chris > > The build.xml snippet follow:: > > > > > > > > > > > > > > > > > > > > > >