🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Loading HTML files from a Jar via URL

#15602
From: Peter Hawkins
Date: Thu, 27 May 1999 00:00
27 lines
1306 bytes
Hi,

I have an application which loads HTML files to be displayed in
JEditorPane. The HTML files are packaged with the application in a JAR
archive.
Currently I am using the following to retrieve the HTML files:

URL The Url = getClass().getResource("file.html");

Is there a format for URL that will allow me to directlt reference files
in the JAR without going through the above procedure ?


Thanks



Peter
-- 
Peter Hawkins

______________________________________________________________
Horizon Open Systems                   The Sidings Office Park
Mail : Peter.Hawkins@HOS.Horizon.ie    Antrim Road
Url  : http://www.hos.horizon.ie       Lisburn
Tel  : 01846 629636                    BT28 3AJ
Fax  : 01846 629584                    Northern Ireland
Technical Details
Message-ID: <374CFAED.91729AE2@hos.horizon.ie>
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: f74b3,247727d9caeaf5a1,start
X-Google-Attributes: gidf74b3,public
From: Peter Hawkins <Peter.Hawkins@hos.horizon.ie>
Subject: Loading HTML files from a Jar via URL
Date: 1999/05/27
Message-ID: <374CFAED.91729AE2@hos.horizon.ie>
X-Deja-AN: 482638749
Content-Transfer-Encoding: 7bit
Organization: Horizon Open Systems
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language