【发布时间】:2015-04-18 13:21:22
【问题描述】:
我目前正在尝试开始使用 eclipse 开发/使用 OSGi 包。问题是 eclipse / OSGi 的组合真的很难设置,而且看起来很重。我用一个 Activator 创建了一个简单的“Hello World”包。我尝试将它作为“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 World”似乎很麻烦。有谁知道如何为插件项目设置eclipse?
【问题讨论】:
-
你在做一个eclipse插件吗??如果是这样您可以将其作为 eclipse 应用程序运行右键单击> 调试为 > eclipse 应用程序而不是 osgi
-
不,只是一个普通的插件。
-
看起来你创建了一个 eclipse hello world 插件,所以我认为你应该将它作为 eclipse 应用程序运行,一切都会正确
-
看起来您使用的东西只能在 Eclipse 插件而不是 OSGi 插件中使用。
-
好吧,我正在努力学习本教程:vogella.com/tutorials/OSGi/article.html