我想在我自己的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 测试程序,但是当我尝试运行它时,我得到 p>
线程“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/