Dynamic Swing OSGi Demo


I am preparing a few talks about dynamic OSGi applications. To get my hands dirty I started a little demo project to showcase different scenarios. That SWT works very well with OSGi is obvious, since Eclipse RCP is based on OSGi. But there are not many Swing based OSGi applications out there. That’s why I started playing around with the dynamic creation and deletion of Swing GUI.

The demo application shows how to use OSGi Declarative Services (DS) and Spring Dynamic Modules (Spring DM) together with Swing UI (and the Swing Application Framework, JSR 296). The goal of this project is to share best practices when it comes to dynamic OSGi-based applications.

The project home page is There you find a bit of documentation and how to get the sources from svn. The current implementation works well with Equinox, I haven’t tried out other OSGi implementations yet.

I would appreciate if OSGi experts take a look at the source code and help me improving the code base. Here is a screen shot:

Have fun!


e4 + css contacts demo


Based on the work of Tom, Boris, Kevin, Angelo and many others, I started a little e4 demo, playing around with Angelo’s Tk-UI css engine to style SWT. Here is the current result:

e4 contacts demo + css

As you see, many things work nicely, some don’t (yet). From the end user’s point of view it was pretty easy to use the Tk-UI css engine. This is definitely something I will investigate further…

JAOO 2008 Conference


I just returned from JAOO 2008, a developer conference held in Aarhus, Denmark. Jaoo is one of my favorite conferences, and this year it was as great as the years before. My “Advanced Eclipse RCP” tutorial went well and I got very valuable feedback. But one thing bothers me when I give “Advanced” RCP tutorials. There are so many topics that I would consider “advanced” that I have to pick them with regards to the expected audience and the tutorial time. So here is my question: What are the 5 most important advanced RCP topics that you would like to see in an advanced RCP tutorial?

Subversive vs. Subclipse


I am a bit frustrated right now. Last week I installed Eclipse 3.4 and I thought, now it is a good time to give Subversive a try, since it is the “official” subversion client now. I am using Subclipse for years now, and it was working very well and smoothly til today. Here are my experiences using Subversive with Native JavaHL connector (Eclipse 3.4 on Windows Vista together with an existing Subversion repository):

  • I destroyed accidentally the src/* directories of many of my projects in the trunk of my subversion repository. I don’t know what I did wrong, because on the client-side everything looked fine to me (And I did exactly what Subversive recommends about reconnecting svn working copies checked out with another client). I only realized the deletion of the source folders when I wanted to check out the projects from another machine. I googled about that strange behavior and found out that I was not the first one who destroyed the src directories…
  • Then I fixed the repository from a recent tag, and checked out all projects into a clean workspace using Subversive. Now I am having problems with the bin directories. I don’t know why, but Subversive thinks that some of my Java files are in the bin directory on the server, but of course they are not. I got error messages like: 0x00000004: The resource is inaccessible: /com.siemens.ct.mp3m/bin/com/siemens/ct/mp3m/ When I open the synchronize view I also see Java files in the svn repository’s bin sub-directory (which don’t exist in the repository)

Probably I just don’t use Subversive the right way or I should try another connector, but right now, I want to switch back to Subclipse. I am wondering if others have similar experiences using Subversive + native JavaHL and Eclipse 3.4 on Vista. Or, I would appreciate any tips how to make it work like I would expect.

RCP Self Provisioning with P2: It Works!!!


I finally could create the mail demo RCP app using p2 to update itself!
My environment is Windows Vista, Java 6, Eclipse 3.4 RC4.

Here are the steps that describe how I p2-enabled the mail demo:

1. Created the mail demo (project p2-maildemo)

2. Created a product configuration p2-maildemo.product

3. Added 3 plug-ins to both launcher and product configuration (and added required plug-ins)
– org.eclipse.equinox.p2.exemplarysetup
– org.eclipse.equinox.p2.ui.sdk
– org.eclipse.equinox.simpleconfigurator.manipulator

To get the final update work in the installed product, it is also necessary to include the following 3 plug-ins with dependencies in the product configuration:
– org.eclipse.ecf.provider.filetransfer
– org.eclipse.equinox.p2.touchpoint.eclipse
– org.eclipse.equinox.p2.touchpoint.natives

4. Exported the product and the metadata/artifact repositories to c:/java/RCP/p2-maildemo

5. Used the director app to install the mail demo from the repository, with the following Program arguments:
-metadataRepository file:c:/java/RCP/p2-maildemo/repository
-artifactRepository file:c:/java/RCP/p2-maildemo/repository
-installIU p2_maildemo.product
-version 1.0.0
-destination c:/java/RCP/p2-maildemo/install
-profile MaildemoProfile
-bundlepool c:/java/RCP/p2-maildemo/install
-profileProperties org.eclipse.update.install.features=true
-p2.os win32 win32
-p2.arch x86

VM arguments:

6. Started the installed mail demo in c:/java/RCP/p2-maildemo/install

7. Selected Help/Software Updates…: Showed the P2 UI with installed Product in version 1.0.0

So far so good!

Now I wanted to create a new version 1.0.1 of the product and update the installed version 1.0.0:

8. Updated main mail demo plug-in to version 1.0.1

9. Updated product version to 1.0.1

10. Exported the new product version 1.0.1 in the SAME location, to update the metadata/artifact repositories.

The first thing I noticed was that my installed 1.0.0 did not find any update. I thought, when the installation repository contains a new version, this would be seen by my application without any extra configuration.

11. So I added the repository c:/java/RCP/p2-maildemo/repository manually as a new site, and voila, the new version 1.0.1 was displayed and ready for update.

12. When I wanted to install the update, the P2 dialog told me correctly: “RCP Product is already installed, so an update will be performed instead.”

13. And now, when I clicked finish, the update was actually happening, the new version was installed properly!!!

I am so happy that I finally got this to run πŸ™‚

What would be the best practice to create a list of artifacts/metadata repositories in the configuration/.settings/org.eclipse.equinox.p2.metadata.repository.prefs and org.eclipse.equinox.p2.artifacts.repository.prefs to include the real update sites for the product?

Many thanks to everybody who helped me.


RCP Headless Build with PluginBuilder


One of my open action items for my MP3 Manager RCP Demo was to provide a headless build. It tried out PDE Build once and it worked great, but I had problems enabling the unit test runs. Recently I created a new project that uses PluginBuilder to generate the PDE build infrastructure. PluginBuilder is a great tool for easily setting up a PDE build structure for your RCP app and supports the integration ofΒ  SVN and CVS, as well as the integration of unit tests. Unfortunately, currently the RCP build only works with Eclipse 3.3.2, when using Eclipse 3.4, the executable is not generated but I hope that 3.4 will be supported when it is final.

P2 and RCP Apps


With every new 3.4 RC I try to p2-enable the mail demo application. I got many valuable tips from Pascal and I think, I am getting closer but I am not there yet :). Here is, what I did:

  • I created the mail demo from the wizard
  • I created a product configuration and included all the necessary p2 related plug-ins
  • Then I exported the app to my local file system
  • The next step was to create a metadata and an artifact repository
  • I used Eclipse 3.4 RC3 and started an osgi app with the following parameters
    -application org.eclipse.equinox.p2.metadata.generator.EclipseGenerator
    -metadataRepository file:C:/java/test-install
    -artifactRepository file:C:/java/test-install
    -source c:/java/rcp/examples/p2-maildemo/eclipse
    -root Mail
    -rootVersion 1.0.0
    -flavor foobar
  • The repositories were successfully created
  • Then I installed the p2 agent 3.4 RC3
  • I created a new profile and installed the Mail application to a new installation location
  • I could successfully run newly installed Mail application πŸ™‚ So far, so good

Now I want to install the application directly from Eclipse using the director application. I created a run configuration with the following argument:

-flavor foobar
-installIU Mail
-version 1.0.0
-p2.os win32 win32
-p2.arch x86
-profile MailProfile
-metadataRepository file:c:/java/test-install
-artifactRepository file:c:/java/test-install
-destination c:/java/rcp/test_install
-bundlepool c:/java/rcp/test_install

It starts running but then I get errors:

!ENTRY org.eclipse.equinox.p2.metadata.repository 4 0 2008-06-03 16:33:30.177
!MESSAGE ProvisioningEventBus could not be obtained. Metadata caches may not be cleaned up properly.
Installing Mail 1.0.0.
Installation failed.

!ENTRY org.eclipse.equinox.p2.engine 4 4 2008-06-03 16:33:31.834
!MESSAGE An error occurred while collecting items to be installed
!SUBENTRY 1 org.eclipse.equinox.p2.artifact.repository 4 0 2008-06-03 16:33:31.834
!MESSAGE Problems downloading artifact: osgi.bundle,MailDemo,1.0.0.
!SUBENTRY 2 org.eclipse.equinox.p2.artifact.repository 4 0 2008-06-03 16:33:31.834
!MESSAGE Unable to read repository at file:c:/java/test-install/plugins/MailDemo_1.0.0.jar.
!SUBENTRY 2 org.eclipse.equinox.p2.artifact.repository 4 0 2008-06-03 16:33:31.834
!MESSAGE Unable to read repository at file:c:/java/test-install/plugins/MailDemo_1.0.0.jar.
!SUBENTRY 2 org.eclipse.core.runtime 0 0 2008-06-03 16:33:31.834
… many more similar errors

All the files that cannot be read actually exist. Here I am stuck and would appreciate any help.



JSR 277 and OSGi ?


Last weekend I met with Geertjan from the NetBeans team and we had an interesting discussion about OSGi, the NetBeans module system and JSR 277. Geertjan showed me a blog entry of Mandy Chung, talking about interoperability of JSR 277 and OSGi. if you are interested in this topic, take a look at Mandy’s recent blog entry and also at the blog of Bryan Atsatt. What do you think?

Eclipse RCP vs. NetBeans Platform BOF @ JavaOne

Friday I got a mail from JavaOne saying that also my BOF Eclipse RCP vs. NetBeans Platform got accepted :). I will do the BOF together with Geertjan Wielenga from Sun. Since we won’t have too much time for discussion during the big technical session, the BOF will be a great opportunity to share experiences with both rich client platforms. The BOF will be Thursday, May 08, 6:30pm – 7:20pm.

Eclipse RCP @ JavaOne

I am very happy that my session “The NetBeans Platform Compared to the Eclipse Rich Client Platform” got accepted at this year’s JavaOne conference. This time I will give the session together with Geertjan Wielenga (from Sun’s NetBeans team), who will cover the NetBeans Platform while I can focus on the Eclipse Rich Client Platform.

Page 10 of 12« First...«89101112»