问题描述
我正在编写Eclipse Oxygen的插件,该插件允许直接从工具栏按钮运行外部工具。当我右键单击该项目并单击以Eclipse应用程序运行时,出现一个弹出窗口,显示以下错误
I am writing a plug-in for Eclipse Oxygen that allows External Tools to be run directly from toolbar buttons. When I right click the project and click Run As Eclipse Application I get a pop-up that shows the following errors
javax.xml.ws
Missing Constraint: Import-Package: java.xml.bind; version="0.0.0"
Missing Constraint: Import-Package: java.xml.bind.annotation; version="0.0.0"
org.apache.xmlrpc
Missing Constraint: Import-Package: java.xml.bind; version="0.0.0"
如果单击继续,Eclipse将使用该插件启动并启动运行正常。我已尝试在的建议下打开运行配置并选择添加必需的捆绑包(尽管使用添加必需的插件,因为没有捆绑按钮),但无济于事。我既看不到列表中的 javax.xml.bind 也找不到添加它的方法。
If I click Continue, Eclipse launches with the plug-in and it operates correctly. I have tried following the advice here to open the 'Run Configuration' and select 'Add Required Bundles' (although using Add Required Plug-ins as there is no bundles button) but it doesn't help. I neither can see javax.xml.bind in the list nor a way to add it.
该项目本身非常简单,如下所示依赖项
The project itself is very simple with the following dependencies
org.eclipse.core.runtime
org.eclipse.debug.ui
org.eclipse.jface
和扩展名
org.eclipse.debug.core.launchers
org.eclipse.ui.commands
org.eclipse.ui.handlers
org.eclipse.ui.menus
我已经列出了依赖关系层次结构,并且没有列出 javax.xml.bind
I have listed the dependency hierarchy and javax.xml.bind is not listed.
如何添加依赖项或清除错误?
How can I add the dependencies or clear the errors?
推荐答案
似乎,这两个软件包( java.xml.bind
和 java.xml.bind.annotation
)
It seems, these two packages (java.xml.bind
and java.xml.bind.annotation
) are missing in your target platform.
添加 javax.xml.bind
插件 >(下载, G。 )安装到您的目标平台即可。
Adding the javax.xml.bind
plug-in (which can be download from Eclipse Orbit, e. g. here) to your target platform should fix the problem.
这篇关于Eclipse Oxygen插件缺少约束:导入包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!