How to show a html file from inside a jar?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Bernd_Goerz
Posted On:   Tuesday, April 3, 2001 01:29 AM

For the documentation of my programm I need to show the html online help.
How can I reach the html file inside the jar file?

Thanks in advance.
Bernd

Re: How to show a html file from inside a jar?

Posted By:   Tim_Rohaly  
Posted On:   Thursday, April 19, 2001 04:36 PM

Assuming the .html file is called "helpfile.html" and
is bundled in the same jar as your
program, simply use either:

URL url = getClass().getResource("helpfile.html");

or

InputStream is = getClass().getResourceAsStream("helpfile.html");

then process as appropriate.
About | Sitemap | Contact