java - 如何下载和使用jface

标签 java swt jface

我想在我自己的java程序中使用JFace,但我不知道如何获取它。

似乎没有像Swt那样的独立下载项目。

我做了一些谷歌搜索,发现了一些旧线程,这些线程说我只需从 Eclipse 中获取 jar 文件。这真的是获取 JFace 的最佳方式吗?

我尝试从 eclipse/plugins 文件夹添加以下 jar 文件:

org.eclipse.jface_3.13.2.v20171022-1656.jar org.eclipse.jface.databinding_1.8.100.v20170503-1507.jar org.eclipse.jface.text_3.12.1.v20171114-1359.jar

当我将它们添加到我的项目中时,我可以编译一个简单的 JFace 测试程序,但是当我尝试运行它时,我得到

线程“main”中出现异常 java.lang.NoClassDefFoundError: org/eclipse/core/runtime/ISafeRunnable

那么JFace对eclipse有哪些依赖呢?

最佳答案

[...] I just had to take the jar files from eclipse. Is this really the best way to get JFace?

据我所知,是的。

So which dependencies does JFace have on eclipse?

要使用 JFace,您应该包含 eclipse/plugins 文件夹中的这些 jar:

org.eclipse.core.commands_<version info>.jar
org.eclipse.equinox.common_<version info>.jar
org.eclipse.jface_<version info>.jar
org.eclipse.osgi_<version info>.jar
org.eclipse.ui.workbench_<version info>.jar  -> not required but recommended

有关更多信息,请参阅https://wiki.eclipse.org/JFace .

关于java - 如何下载和使用jface,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49639815/

相关文章:

swt - 如何在 Eclipse RCP 应用程序中刷新 TableViewer

java - 循环遍历 array.xml

java - Android-OpticalFlow : calcOpticalFlowPyrLK & goodFeaturesToTrack return same points

java - 在 JFace 查看器中反射(reflect)数据更改的正确方法

java - 如何在Java SWT中创建不显示的图像

java - 如何在SWT中使用圆角填充矩形实现透明度?

java - 突出显示 SWT 树节点中的特定字符串

java - Android webview读取cookies

java - 将列表合并为具有唯一元素的单个数组

swt - 树浏览器 : using Drag & Drop to reorder or reparent elements in a tree