Over a million developers have joined DZone.

Did My Plug-in Load?

DZone's Guide to

Did My Plug-in Load?

· Java Zone
Free Resource

Learn how to troubleshoot and diagnose some of the most common performance issues in Java today. Brought to you in partnership with AppDynamics.

One of the most frequent question I get asked is 'How to check if my plug-in is getting picked up properly?' The easiest way to verify is by using Host OSGi Console.

Note that if you do not see 'osgi>' prompt, just press Enter key once. Now you can issue OSGi commands and verify the status of your plug-in

ss is OSGi command to check the status of a plug-in.
Issue help command to see other commands possible as osgi prompt.

You may find some more info at

So the STARTING status means that the plug-in has been discovered but not loaded yet (lazy loading - no class from this plug-in has been requested yet). Once you invoke a functionality that shall need this plug-in, the status shall change to ACTIVE. This would mean that your plug-in is now been loaded into memory.
This is fine, how did we land to OSGi console and how to use Self Hosting?
Self Hosting is nothing but launching your plug-ins with ' Eclipse Application' launch configuration. This launches a new Eclipse instance (called guest instance) having your chosen plug-ins along with the Target Platform

So can be done now is, self-host your eclipse plug-ins. Invoke the Console view and switch to OSGi console and have a look at the state of your plug-ins. This will tell if the Eclipse was able to locate and load plug-ins.

But you want more.

How would you verify the manifest or plugin.xml for the plug-in that got loaded. Typical stuff to check when an extension is not behaving.

Invoke the Plug-ins view. It will show all the plug-ins with which the Guest Eclipse was launch. That is, target platform plus selected workspace plug-ins. You can find you plug-in in this view and expand it to see all its contents. Since, it not a binary plug-in but coming straight from the workspace, you can view the source code that got built and used for this plug-in.

Interestingly, there is one more friend - Plug-in Registry view. This would tell you the location from where the plug-in was picked. The extensions and extension points detected by Eclipse and the dependency tree.

With these views, you can pin point on what code got loaded, from where and what state it is in now.


Understand the needs and benefits around implementing the right monitoring solution for a growing containerized market. Brought to you in partnership with AppDynamics.


Published at DZone with permission of Ankur Sharma, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.


Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.


{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}