🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #16910

getting images from a jar in an application/applet

#16910
From: ted19
Date: Sun, 03 Jan 1999 00:00
17 lines
1577 bytes
Ok...So JARs are great because they save you time in moving the applet code
around....but what if you want to use the same jar as an application?

I have a jar ajar.jar which has an applet, an application, and a bunch of
images in it. As an applet it's hunky-dory. As an application the images are
nowhere to be found (jre -cp ajar.jar MainClass) can't find the images. I
realized that the jar is on the CLASSPATH, not the PATH! I copied the JARred
images out of the jar and into the filesystem, and it works fine. Is there a
way of using jarred images in applications?

This has to be a common thing. Is there a pattern for handling this?

Thanks
Ted the Perplexed.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    
Technical Details
Message-ID: <76nk97$hr5$1@nnrp1.dejanews.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 146a3d,40a4afbfce32ce3b,start
X-Google-Attributes: gid146a3d,public
X-Google-Thread: f74b3,40a4afbfce32ce3b,start
X-Google-Attributes: gidf74b3,public
From: ted19@hotmail.com
Subject: getting images from a jar in an application/applet
Date: 1999/01/03
Message-ID: <76nk97$hr5$1@nnrp1.dejanews.com>
X-Deja-AN: 428255723
X-Http-Proxy: 1.1 x14.dejanews.com:80 (Squid/1.1.22) for client 208.255.83.32
Organization: Deja News - The Leader in Internet Discussion
X-Article-Creation-Date: Sun Jan 03 11:28:39 1999 GMT
Newsgroups: borland.public.jbuilder.java.language,borland.public.jbuilder.java.applet-issues
X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows 98)