Article View: borland.public.jbuilder.java.api
Article #360Re: getClassLoader does'nt find the file
From: Tor Iver Wilhelmsen (TeamB)
Date: Thu, 09 Oct 2003 07:12
Date: Thu, 09 Oct 2003 07:12
12 lines
1505 bytes
1505 bytes
"Guy Perron" <gperron@cmontmorency.qc.ca> writes:
> URL url = getClass().getClassLoader().getResource("a file that is in the
> same directory as the.jpx file");
That call will look for the resource at the root of the classpath,
i.e. the "classes" directory or any library defined for the project.
> and I always get a null pointer for url. The same code is working with
> Eclipse, and BlueJ but it does'nt work in Jbuilder.
Why do they place their project file in a dir placed on the classpath?
Technical Details
Message-ID:
<ullru995t.fsf@ergo.no>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-05!sn-xit-09!supernews.com!diablo.theplanet.net!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.media.kyoto-u.ac.jp!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<3f848d66@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,dbe4c80eee321a10 X-Google-Attributes: gid1089d0,public X-Google-ArrivalTime: 2003-10-09 00:22:26 PST Sender: towi@SDSA3850 Newsgroups: borland.public.jbuilder.java.api Subject: Re: getClassLoader does'nt find the file References: <3f848d66@newsgroups.borland.com> From: tor.wilhelmsen@ergo.no (Tor Iver Wilhelmsen (TeamB)) Date: 09 Oct 2003 09:12:30 +0200 Message-ID: <ullru995t.fsf@ergo.no> Lines: 12 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: 139.105.7.229 X-Trace: newsgroups.borland.com 1065683549 139.105.7.229 (9 Oct 2003 00:12:29 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-05!sn-xit-09!supernews.com!diablo.theplanet.net!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.media.kyoto-u.ac.jp!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail