🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Loading HTML from a JAR file

#19738
From: Paul Whittington
Date: Tue, 23 Dec 1997 00:00
82 lines
3449 bytes
This is a multi-part message in MIME format.
--------------927EF9FE92B251B246DD83FA
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

You could write a bit of Java that the browser loads in and it
in turn reads from the .JAR file and displays stuff within the browser.


Scott Lavender wrote:

> Juan,
>
> Thanks for the reply. I don't think that you understood my question. Or
> maybe I didn't ask it clearly. My existing Java application already uses the
> appropriate code to load images and other files from within a JAR file.
>
> What I was asking is how can I allow a web browser to access the HTML files
> when not running the application.
>
> Thanks.....
>
> -----Original Message-----
> From: Juan Pedro Barbancho Manchon [SMTP:ct2bamaj@uco.es]
> Sent: Tuesday, December 23, 1997 7:09 AM
> To: Lavender, Scott
> Subject: Re: Loading HTML from a JAR file
>
> Scott Lavender wrote:
>
> > Does anyone know how to access HTML files that are located in a JAR
> > file?
> >
> > I have an application that is distributed as a JAR file. The
> > applications' help files (HTML) are loacted within the JAR file in a
> > "help/" subdirectory. When the user is running the application, the
> > application provides code to view the help files. This works fine.
> >
> > I would like for the user to be able to access the help files
> > off-line,
> > application not running, with out extracting them from the JAR. Is
> > there
> > a way to use a standard browser to view these HTML documents from
> > inside
> > the JAR?
> >
> > Any help would be appreciated.
> >
> > Thanks.....
>
>    Dear sir,
> In order to read files from a .jar, I recommend you to use
>         URL in = this.getClass().getResource( file );
> the file dout be in .jar located in Classpath.
>
> You only dout
>     setDocument( in);
>
> JuanP



--------------927EF9FE92B251B246DD83FA
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Paul Whittington
Content-Disposition: attachment; filename="vcard.vcf"

begin:          vcard
fn:             Paul Whittington
n:              Whittington;Paul
org:            Idaho National Engineering and Environmental Laboratory
email;internet: paul@sage.inel.gov
title:          Advisory Engineer
x-mozilla-cpt:  ;0
x-mozilla-html: TRUE
version:        2.1
end:            vcard


--------------927EF9FE92B251B246DD83FA--
Technical Details
Message-ID: <34A01FFB.47059D19@sage.inel.gov>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <349ED181.20CDCC69@s2systems.com> <349FACC9.A194C759@s2systems.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10a146,f0172b5e4d7dead7
X-Google-Attributes: gid10a146,public
X-Google-Thread: 14aafe,48a2dd43499a6e2b
X-Google-Attributes: gid14aafe,public
X-Google-Thread: 113ae9,f0172b5e4d7dead7
X-Google-Attributes: gid113ae9,public
X-Google-Thread: f74b3,f0172b5e4d7dead7
X-Google-Attributes: gidf74b3,public
From: Paul Whittington <paul@sage.inel.gov>
Subject: Re: Loading HTML from a JAR file
Date: 1997/12/23
Message-ID: <34A01FFB.47059D19@sage.inel.gov>
X-Deja-AN: 309712920
References: <349ED181.20CDCC69@s2systems.com> <349FACC9.A194C759@s2systems.com>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="------------927EF9FE92B251B246DD83FA"
Organization: Idaho National Engineering and Environmental Laboratory
Newsgroups: borland.public.jbuilder.java.language,comp.lang.java.help,comp.lang.java.programmer,comp.lang.java.help,borland.public.java.language