java org.eclipse.ui 无法解决?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/15628031/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-31 20:18:45  来源:igfitidea点击:

org.eclipse.ui can't be resolved?

javaswt

提问by King King

Could you please tell me how to resolve that package import, I thought it is an element of SWT and I've already have SWT installed into Eclipse IDE. Why is it so bothersome? I guess I have to download some *.jar or *.zip files to add to my project as external library.

您能否告诉我如何解决该包导入问题,我认为它是 SWT 的一个元素,而且我已经将 SWT 安装到 Eclipse IDE 中。为什么这么麻烦?我想我必须下载一些 *.jar 或 *.zip 文件才能作为外部库添加到我的项目中。

Please give me a solution. Thank you!

请给我一个解决方案。谢谢!

VipHaLong.

唯品龙。

采纳答案by Alexey Romanov

No, org.eclipse.uiis definitely not part of SWT (or vice versa, but it requires SWT). If you are creating an RCP plugin (if not, you probably shouldn't be using org.eclipse.ui), you need to open plugin.xmlfile, "Dependencies" tab, and add org.eclipse.uito "Required plugins".

不,org.eclipse.ui绝对不是 SWT 的一部分(反之亦然,但它需要 SWT)。如果您正在创建 RCP 插件(如果没有,您可能不应该使用org.eclipse.ui),您需要打开plugin.xml文件,“依赖项”选项卡,然后添加org.eclipse.ui到“所需插件”。

回答by SRB

  1. Download SWT library. For 3.1.2 version of eclipse, SWT library is available at http://archive.eclipse.org/eclipse/downloads/drops/R-3.1.2-200601181600/index.phpLook for the section titled SWT Binary and Source.

  2. Then follow this link: http://www.mkyong.com/swt/how-to-import-swt-library-into-eclipse-workspace/

  1. 下载 SWT 库。对于 3.1.2 版本的 eclipse,SWT 库位于http://archive.eclipse.org/eclipse/downloads/drops/R-3.1.2-200601181600/index.php查找标题为 SWT Binary and Source 的部分。

  2. 然后点击这个链接:http: //www.mkyong.com/swt/how-to-import-swt-library-into-eclipse-workspace/

follow it step by step and mostly you will get the solution. I was stuck with the same problem .

一步一步地遵循它,大多数情况下你会得到解决方案。我遇到了同样的问题。