[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.rcp] Deploying Rich Client Applications using Java Web Start

Hi,

I have been trying to solve a small problem with deploying Eclipse-based
Rich Client Applications with Web Start. I get some ClassNotFoundExceptions
for classes that are there. I am able to run the applications from Eclipse
and export them as products with no problems at all, therefore I write you
hopeing there is a solution to my problem.

As I started investigating, I found that for products, plug-ins are created
as folders with JARs inside them, while for Java Web Start it is JARs with
other JARs inside them, and I believe that to be the problem.

I investigated further using a simple example from Eclipse. I created a
project and used the wizards from Eclipse 3.1.1 to have an example as
simple as possible to test on. The project is an Eclipse plug-in project
with the Rich Client Application option set to yes, and the Template
used is "Hello RCP".

I added another project to my Eclipse workbench, this time a feature project.
Using the project wizard in Eclipse using default values as I go through it.
To the feature project I add a product configuration, and for both the
feature and the product I add the required depencies (Eclipse JARs) to make
the system run as a feature and as an application (product).


Until now everything seems to work fine. However, when I add an external
library to the system (I used the apache log4j library[1], as an example),
I can get it to run as a product (directory structure for plug-ins), but
not as a Web Start launched application (JARs inside of JARs).

As it would not be a bigger problem to just include log4j in another way for
the simple example, it would increase the complexity of my initial project a
lot.


I am able to get Eclipse to make me JARs for Web Start that look like this:

some_name.jar:
--------------
META-INF/MANIFEST.MF
META-INF/SIGNER.DSA
META-INF/SIGNER.SF
plugin-source.jar
dependency1.jar
dependency2.jar
plugin.xml

The plugin-source.jar and dependency*.jar are all JARs with standard JAR-file
structures. Therefore I see no problem here.


For products this structure is extracted into it's own folder, while it is
packacked into the JAR for WebStart. It works as a product, it does not work
for Web Start.


Is there a solution to this problem? or do I need to manange the depencies of
each plug-in in another way?


Jan Tvorup

[1] http://logging.apache.org/log4j/docs/