Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to reference HTML inside jars
How to reference HTML inside jars [message #464707] Tue, 13 March 2007 22:03
Eclipse UserFriend
Originally posted by: mash_909.yahoo.co.uk

One of my plugins contains a simple HTML info page displayed using the
Browser widget. When I export my app, this plugin is exported as a jar.
When the app references the HTML, any other files (ie images, css)
referenced by the HTML cannot be read, obviously because the jar knows
nothing about the path structure.

In the Eclipse RCP book (McAffer, Lemieux. p125) it states "if your
plugin is shipped as a jar file and the about.html references other
pages in the plug-in, the additional pages must be in a directory called
about_files at the root of the plugin. This is required because Eclipse
extracts the files from the JAR before presenting the root file in the
web browser - browsers typically cannot see inside JARs."

So I take this to mean that if I have a file in my jar called
about.html, and this file references 'info.gif', then the HTML would
contain this:

<img src="info.gif">

and about.jar would be structured thus:

-about.html
---about_files/
-------info.gif

However - I cannot get this to work after exporting: The HTML appears,
ok, but the image does not.
Does anyone know what I'm doing wrong?

thanks
Matt
Previous Topic:Configure Help Browser
Next Topic:Jobs API
Goto Forum:
  


Current Time: Thu Sep 12 13:34:12 GMT 2024

Powered by FUDForum. Page generated in 0.02371 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top