Original address: http://blog.csdn.net/jsjszg/article/details/7370814
When you create a new plug-in project, you need to select Target platform:
There are three types of options:
1. Eclipse version
2, an OSGi Framework:equinox
3, an OSGi Framework:standard
What do you mean?
Eclipse version refers to how the Eclipse UI plug-in works.
The An OSGi framework refers to a non-UI plug-in that runs under OSGi.
Option: Equinox refers to using Equinox (Eclipse's OSGi implementation)
Option: standard refers to the use of standards for OSGI implementations
Here's how they differ:
1. The difference between automatically generated code:
Select Eclipse version, then the default generated activator is inheritance and abstractuiplugin.
[Java] View plain copy package helloservive04; import org.eclipse.ui.plugin.abstractuiplugin; import org.osgi.framework.bundlecontext; /** * the activator class controls the plug-in life cycle */ public class activator extends abstractuiplugin { // The plug-in ID public static final String PLUGIN_ID = "HelloServive04"; //$ non-nls-1$ // The shared instance private static Activator plugin; /** * The constructor */ public activator () { } /* * (non-javadoc) * @see org.eclipse.ui.plugin.abstractuiplugin#start ( Org.osgi.framework.BundleContext) */ Public void start (bundlecontext context) throws Exception { super.start (context); plugin = this; } /* * (non-javadoc) * @see org.eclipse.ui.plugin.abstractuiplugin#stop (org.osgi.framework.BundleContext) */   public void stop (Bundlecontext context) throws Exception { plugin = null; super.stop (context); } /** * Returns the shared instance * * @return the shared instance */ Public static activator getdefault () { return plugin; } }