如何下载和使用jface
How to download and use 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,但我不确定如何获得它。
似乎没有像 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。