OSGi and NetBeans IDE Mentioned on java.net

The article I wrote on OSGi support in NetBeans IDE ended up on the java.net front page a few days ago:

The cool thing about it is that I was able to use NetBeans IDE as a complete end to end development tool for extending GlassFish, using the same development paradigms as I do when creating NetBeans modules. Only the output was different (a JAR which is an OSGi bundle, instead of an NBM file). Really cool stuff.

Another article on this topic that's really good is Integrating Felix with NetBeans, on the Felix site.

Looking forward to more explorations in this area, Fabrizio has a good article on it too.


There are plenty of ways of building OSGi bundles that don't depend on special support from your IDE.

I'm primarily an Eclipse user but my approach to building OSGi bundles would work in NetBeans or even plain old vi/emacs. In fact I did a demo at a JUG in London in 2006 using NetBeans, just to prove that OSGi wasn't an Eclipse-only technology.

I use BND, developed by Peter Kriens. http://www.aqute.biz/Code/Bnd

Posted by Neil Bartlett on February 18, 2009 at 05:33 AM PST #

Thanks for your comments Neil. I clicked the link to your blog and read your comments re GlassFish and OSGi and Arun Gupta's rather trivial example (which, since I've not found anything else I can do with GlassFish OSGi, I've been forced to replicate in my own examples). I've tried to get further info on that point from Sun colleagues for a while, to no avail, but will keep trying. I've simply been assuming that GlassFish includes OSGi services and I simply haven't found the documentation about them. But maybe I'm simply wrong. Is Sun's OSGi integration in GlassFish useful for 'Hello World' scenarios only? Discuss. :-)

Posted by Geertjan on February 18, 2009 at 07:16 AM PST #


First I need to point out that I haven't looked at GFv3 since I wrote that blog post in early November, so this might have changed. However, as it stood there was nothing useful that you could do with OSGi in GFv3 in terms of deploying your own bundles. It's an implementation detail at this point.

Now, this is no worse than most of the other app servers using OSGi. IBM WebSphere AS 6.1 is based on Equinox but also doesn't let me deploy my own bundles and hook into platform services. I believe that there may be plans to evolve GFv3 towards making more use of services and opening it up to OSGi deployment, but that would be subject to future development.

The route the GF team are taking is exactly the one I would follow if I had a large "legacy" code base that needed to be converted to OSGi. First I would start by modularising it, and then I would work on making it dynamic and services-driven. So I don't wish to criticise what the GF team have done, far from it, I'm just a bit impatient for them to make the next step.


Posted by Neil Bartlett on February 18, 2009 at 04:09 PM PST #

Hi Geertjan,

I remember that we talked about NetBeans/OSGi integration at last year's JavaOne. Great to see that this topic gets more interest now.

Best regards,


Posted by Kai Tödter on February 18, 2009 at 09:45 PM PST #

Hi Neil, thanks for the perspective. Hi Kai, yes, it's looking pretty good isn't it? Exactly as we were talking about: being able to create OSGi bundles so that they can be shared with other applications. However, the NetBeans Platform itself is not (as far as I know) going to be based on OSGi: though it will be possible to CREATE OSGi bundles (to extend GlassFish or some other OSGi app), that doesn't mean that the NetBeans Platform itself (including NetBeans IDE and any other app on top of it) will be able to USE those bundles.

Posted by Geertjan on February 19, 2009 at 05:50 PM PST #

"However, the NetBeans Platform itself is not (as far as I know) going to be based on OSGi"

Why do you say that? To me, it seems like just a matter of time before NetBeans is based on OSGi. The politics don't seem to be such an issue any more, as Glassfish has already shown the way.

Posted by Neil Bartlett on February 26, 2009 at 09:06 PM PST #

Right, it's not a question of politics. Just of priorities. I haven't seen this being a priority and it would entail a lot of work to redo NetBeans modules as OSGi bundles.

Posted by Geertjan Wielenga on February 26, 2009 at 09:10 PM PST #

I have just found a osgi plugin for netbeans:

Posted by osgi on May 03, 2009 at 05:42 PM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.


« July 2016