目前,我正在尝试开始使用eclipse开发/使用OSGi包。问题是eclipse / OSGi组合确实很难设置,而且似乎很重。我用Activator创建了一个简单的"Hello“包。我试图将它作为一个"OSGi框架“运行,但是我会被错误/异常所困扰。首先,我得到了很多错误:
!ENTRY org.eclipse.update.configurator 4 0 2015-04-18 15:03:31.119
!MESSAGE Could not install bundle plugins/org.eclipse.team.core_3.7.0.v20130514-1224.jar A bundle is already installed with the name "org.eclipse.team.core" and version "3.7.0.v20130514-1224"每个随eclipse运送的包裹我都能得到这个。在此之后,我得到以下例外:
org.osgi.framework.BundleException: Exception in org.eclipse.debug.internal.ui.DebugUIPlugin.start() of bundle org.eclipse.debug.ui.
Caused by: java.lang.IllegalStateException: Workbench has not been created yet.在那之后,我得到了一个与码头有关的异常(为什么?)
org.osgi.framework.BundleException: Exception in org.eclipse.equinox.http.jetty.internal.Activator.start() of bundle org.eclipse.equinox.http.jetty.
Caused by: org.osgi.service.cm.ConfigurationException: default : Permission denied
Caused by: java.net.SocketException: Permission denied要让一个程序打印"Hello“似乎很麻烦。有人知道如何为插件项目设置eclipse吗?
发布于 2015-05-08 12:43:02
事实上,eclipse在创建一个新项目时有点草率。在Juno中,您可以创建“插件项目”或“插件开发>插件项目”。第一个是eclipse插件,后者是一个普通的OSGi包。这真是不幸的名字。
我创建了一个新的OSGi包项目,一个新的"OSGi框架“配置,并添加了要点:
org.apache.felix.gogo.command
org.apache.felix.gogo.runtime
org.apache.felix.gogo.shell
org.eclipse.osgi.console还有我自己的包(com.vogella.osgi.firstbundle)到邦德斯家。现在一切正常,线程启动并打印到控制台,我可以输入诸如ss / start等命令。
https://stackoverflow.com/questions/29717946
复制相似问题