Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-core-dev] Use of Eclipse plugin framework in pure Java applications

Hi!

I would like to use the Eclipse plugin framework to deploy pure Java
applications. I work on a set of closely related pure Java applications,
both non-GUI (standalone and MBeans) and Swing-based GUI (with WebStart and
InstallAnywhere installers), that I would like to build as a collection of
components. Since I really like the Eclipse plugin architecture, I would
like to use it as my component architecture. However, I do not want to use
any non-Java Eclipse code, SWT, or the main eclipse.exe.

Has anybody done this?
Sure. We are using the Eclipse plugin infrastructure to develop some of our normal applications and it works fine. For example a banking workplace where third-party-companies are able to add new products and product selling tools to it using plugins (just to mention one).

Are there any dependencies in the base plugin framework on native platform
code, e.g., org.eclipse.core.resources.*, that would make it impossible to
reuse the implementation of the framework in a pure Java context?
From my point of view there are no additional dependencies. The core packages are pure Java, I think. But there are a few things you might should keep in mind because they can cause problems when building a system out of plugins:

- Libraries from other vendors might use a special class loading implementation for their customization. I know one that uses the system class path to load classes via a special class loader. This kind of ugly implementation does not work in the context of plugins.

- The serialization mechanism of Java causes some problems. Just think of a situation where you what to serialize some objects which classes are defined in different plugins. Okay. But the de-serialization fails in the default case. You have to implement a special object input/output stream to store additional information into the stream from which plugin a class used inside the stream is. Or does somebody knows a more elegant solution? I would be happy to hear.


In order to ship an application using WebStart, all content must be in jars.
I understand that putting plugin.properties and plugin.xml into a jar and
breaking the directory structure, e.g., a single directory containing all
jars requires some change to the plugin framework. Are there any fundamental
issues with the current implementation that would make these changes very
difficult?
We used WebStart to deploy an Eclipse-plugin-based application. Therefore we build a special startup class that configures the plugin directory with the downloaded jars and starts the Eclipse launcher. Works fine!

Best regards,
Martin




Back to the top