🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #8970

Re: Image in a Jar

#8970
From: Nils Olav Sel�sdal
Date: Sun, 18 Jun 2000 00:00
32 lines
1567 bytes
getClass.getResource(..name...);
getClass.getResourceAsStream(..name...);


> I have a java aplication in an executable jar file. I have the images and
> properties in folders inside the JAR. I handle both, images and properties
> as resources.
> The problem I have is executing the JAR, it runs perfect but doesn't find
> the resources.(images, property files).
> When I include the images folders in the same working directory of my jar
it
> works.
> Why my application can't find the resources inside the jar file?
>
> What I have to do?.
> Thanks in advance.
>
> Alex
>
> ex. myapp.jar
>         |
>         |--------- images
>                         |------- icon.gif
>         |--------- properties
>                         |------- app.properties
>         |-------- main.class
>         |-------- ....
>
>
>
>
>
Technical Details
Message-ID: <5Ds35.6451$eI.83722@news1.online.no>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <8gm7o9$bfb4@bornews.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,7859b3a34136cab0
X-Google-Attributes: gid111d45,public
From: "Nils Olav Sel�sdal" <noselasd@frisurf.no>
Subject: Re: Image in a Jar
Date: 2000/06/18
Message-ID: <5Ds35.6451$eI.83722@news1.online.no>
X-Deja-AN: 636442764
References: <8gm7o9$bfb4@bornews.borland.com>
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4132.2100
X-Complaints-To: news-abuse@online.no
X-Trace: news1.online.no 961435201 130.67.113.10 (Mon, 19 Jun 2000 19:20:01 MET DST)
Organization: Telenor Online Public Access
X-MSMail-Priority: Normal
NNTP-Posting-Date: Mon, 19 Jun 2000 19:20:01 MET DST
Newsgroups: borland.public.jbuilder.java.swing