识别jface所需的插件

运行基于jface的程序时,有时会出现 can not find main class 错误. 而程序看起来似乎毫无错误.这时应该检查一下jface的依赖项. 而jface在不同的版本却有不同的依赖项,应该如何找到你所使用的jface的依赖项呢?不用google了,这里有你要的答案.
打开eclipse菜单: Window/Show View/PDE/Plug-ins.
这样,就打开了Plug-in Dependencies视图.
[img]http://wiki.eclipse.org/images/f/f0/Jface_dependencies2.png[/img]
选择jface,这样就可以得到dependencies,将相应插件添加进build path就可以了.
[img]http://wiki.eclipse.org/images/2/2e/Jface_dependencies.png[/img]

参考:
[urlhttp://wiki.eclipse.org/JFace#Identify_the_Required_External_JAR_Files_for_SWT_and_JFace][/url]

原文:
Identify the Required External JAR Files for SWT and JFace
A JFace project requires the SWT classes, JFace classes, and other Eclipse classes that JFace is dependent on. The SWT classes will be provided in the file we download from the SWT Project Website. The JFace file, and the files the JFace is dependent upon, need to be added to the project manually.

The first step is to identify the required JAR files for JFace. The primary file is called org.eclipse.jface, followed by specific version information. In addition, this file requires classes from other Eclipse JAR files. For Eclipse version 3.3.1.1, the required JAR files for JFace are as follows (where <version info> is the specific version information):

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
The file org.eclipse.ui.workbench_<version info>.jar is not required to run the standard JFace classes. However, since it adds a number of very useful Dialogs (such as ListDialog, ListSelectionDialog, and others), it is included here as well.

You can find the JFace dependencies for any Eclipse version if you have the Plug-in Development Environment, which includes the Plug-ins and Plug-in Dependencies views. To do this:

1.Select Window/Show View/PDE/Plug-ins. (Note, if you don't have a PDE view folder, it means you don't have the Plug-in Developer Environment plug-in in your Eclipse installation.)
2.Select the org.eclipse.jface plug-in from the list.
3.Right-click and select Open Dependencies. This will open the Plug-in Dependencies view. An example of this view for Eclipse version 3.3.1.1 is shown below.
4.Press the Set Flat Layout button to see a simple flat list of the required plug-ins, as shown below.
5.Each plug-in on the list corresponds to a JAR file in the plugins directory for your Eclipse installation. If the list for your Eclipse version is different than the list above, make a note of it and modify the remaining instructions accordingly. At this point, we have the list of JAR files that we need.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值