import com.example.MyProvider; import org.osgi.framework.BundleActivator; import org.osgi.framework.BundleContext; import org.osgi.framework.FrameworkUtil; public class MyActivator implements BundleActivator { private MyProvider provider; @Override \tpublic void start(BundleContext bundleContext) throws Exception { \t\tprovider = new MyProvider(); \t\tprovider.registerBundle(FrameworkUtil.getBundle(MyActivator.class)); \t\tprovider.setFilter("com.example.mypackage.*"); \t\tprovider.startDebugging(); \t} \t@Override \tpublic void stop(BundleContext bundleContext) throws Exception { \t\tprovider.stopDebugging(); \t} }


上一篇:
下一篇:
切换中文