Article View: borland.public.jbuilder.java.api
Article #652Re: How to include GIF in jar-file
From: J. Ebert
Date: Tue, 25 Mar 2003 14:22
Date: Tue, 25 Mar 2003 14:22
28 lines
1915 bytes
1915 bytes
I got it to work with your hint, but still have a problem that
it only works when the gif is in two different locations in the
filesystem:
src/images/my.gif
src/de/xx/myclass/images/my.gif
I reference the gif with
URL dateiname = getClass().getResource
"/images/cross_16mal18.gif" );
The first location seems to be necessary in order to work
outside JBuilder. The second location to work within JBuilder.
The jar-file contains both gif's (what I don't like).
Any hint how the setup in JBuilder must be and where the gif
is supposed to be in the filesystem??
Thank you, Jens
tor.wilhelmsen@ergo.no (Tor Iver Wilhelmsen (TeamB)) wrote:
>"J. Ebert" <ebert@hhpv.de> writes:
>
>> I would like to have the gif in the jar-File that the archive
>> builder builds. And I do not know how to reference the gif when
>> it is not on the disk.
>
>It will be on the classpath, use
>getClass().getResource("/theimage.gif")
Technical Details
Message-ID:
<3e806632$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!news-out.visi.com!petbe.visi.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3e803895$1@newsgroups.borland.com> <usmtbu13n.fsf@ergo.no>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,b0881a9f84e280a7 X-Google-Attributes: gid1089d0,public X-Google-ArrivalTime: 2003-03-25 06:40:04 PST From: "J. Ebert" <j.ebert@hhpv.de> Sender: "J. Ebert" <j.ebert@hhpv.de> Reply-To: "J. Ebert" <j.ebert@hhpv.de> Subject: Re: How to include GIF in jar-file Newsgroups: borland.public.jbuilder.java.api X-User-Info: 212.18.80.16 212.18.80.16 X-Forwarded-For: unknown, 212.18.75.194 References: <3e803895$1@newsgroups.borland.com> <usmtbu13n.fsf@ergo.no> NNTP-Posting-Host: 207.105.83.65 Message-ID: <3e806632$1@newsgroups.borland.com> Date: 25 Mar 2003 06:22:42 -0800 X-Trace: newsgroups.borland.com 1048602162 207.105.83.65 (25 Mar 2003 06:22:42 -0800) Lines: 29 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!news-out.visi.com!petbe.visi.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail