使用SWT/JFace开发的几大好处
1、Java语言及其生态群落的优势
2、Java开发人才的优势
3、跨平台运行
4、各平台下优秀的性能。
以下是开发环境和工具选型参考
一、操作系统
Window 7
Ubuntu 10 + desktop
二、库包
1.JDK 6最新update
2.SWT开发包 http://www.eclipse.org/swt/
3.JFace开发包,Eclipse目录里找
org.eclipse.core.commands_xxx.jar
org.eclipse.core.runtime_xxx.jar
org.eclipse.equinox.common_xxx.jar //一定要加,不然会报java.lang.NoClassDefFoundError: org/eclipse/core/runtime/IProgressMonitor
org.eclipse.jface_xxx.jar
org.eclipse.jface.text_xxx.jar
org.eclipse.osgi_xxx.jar
org.eclipse.jface.nl1_3xx.jar #解决jface的dialog中文问题
更新:2012/10/26
做个批处理将这些jar包复制过来,再手工加到eclipse的user lib里面
@echo offset ECLIPSE_HOME=D:\Java\ide\eclipse-rcp-indigo-SR2-win32-x86_64
@echo ------------------------------------------------------------
@echo copy required jars...
@echo ------------------------------------------------------------
copy %ECLIPSE_HOME%\plugins\org.eclipse.core.commands_*.jar .
copy %ECLIPSE_HOME%\plugins\org.eclipse.core.runtime_*.jar .
copy %ECLIPSE_HOME%\plugins\org.eclipse.equinox.common_*.jar .
copy %ECLIPSE_HOME%\plugins\org.eclipse.jface_*.jar .
copy %ECLIPSE_HOME%\plugins\org.eclipse.jface.text_*.jar .
copy %ECLIPSE_HOME%\plugins\org.eclipse.osgi_*.jar .
copy %ECLIPSE_HOME%\plugins\org.eclipse.jface.nl1_3_*.jar .
@echo ------------------------------------------------------------
@echo copy optional jars
@echo ------------------------------------------------------------
copy %ECLIPSE_HOME%\plugins\org.eclipse.equinox.registry_*.jar .
copy %ECLIPSE_HOME%\plugins\org.eclipse.text_*.jar .
copy %ECLIPSE_HOME%\plugins\org.eclipse.ui.workbench_*.jar .
copy %ECLIPSE_HOME%\plugins\com.ibm.icu_*.jar .
copy %ECLIPSE_HOME%\plugins\org.eclipse.ui.forms_*.jar .
@echo ------------------------------------------------------------
@echo copy swt jars
@echo ------------------------------------------------------------
copy %ECLIPSE_HOME%\plugins\org.eclipse.swt*.jar .
@echo ------------------------------------------------------------
@echo done
@echo ------------------------------------------------------------
pause
注:使用eclipse-rcp和WindowBuilder(见三、四)新建SWT/JFace项目会自动导入库包
%ECLIPSE_HOME%\plugins\org.eclipse.osgi_3.7.2.v20120110-1415.jar
%ECLIPSE_HOME%\plugins\org.eclipse.core.commands_3.6.0.I20110111-0800.jar
%ECLIPSE_HOME%\plugins\org.eclipse.equinox.common_3.6.0.v20110523.jar
%ECLIPSE_HOME%\plugins\org.eclipse.equinox.registry_3.5.101.R37x_v20110810-1611.jar
%ECLIPSE_HOME%\plugins\org.eclipse.core.runtime_3.7.0.v20110110.jar
%ECLIPSE_HOME%\plugins\org.eclipse.text_3.5.101.v20110928-1504.jar
%ECLIPSE_HOME%\plugins\org.eclipse.swt.win32.win32.x86_3.7.2.v3740f.jar
%ECLIPSE_HOME%\plugins\org.eclipse.jface_3.7.0.v20110928-1505.jar
%ECLIPSE_HOME%\plugins\org.eclipse.jface.text_3.7.2.v20111213-1208.jar
%ECLIPSE_HOME%\plugins\org.eclipse.ui.workbench_3.7.1.v20120104-1859.jar
%ECLIPSE_HOME%\plugins\com.ibm.icu_4.4.2.v20110823.jar
%ECLIPSE_HOME%\plugins\org.eclipse.ui.forms_3.5.101.v20111011-1919.jar
4.JFace国际化语言包
http://archive.eclipse.org/eclipse/downloads/
只能下到3.2.x的版本,不过够用了。
三、IDE
eclipse-rcp
http://www.eclipse.org/downloads/
注意选下面这个,目前最新版是3.7.1。为什么选这个?因为有SWT和JFace的联机文件,jee的版本里就没有!
Eclipse for RCP and RAP Developers
eclipse-plugins
1、properties eidtor for eclipse 3.x,编辑国际化中文时会用到的
2、subclipse,SVN插件,基本上标配了
3、checkstyle, findbugs,锦上添花
四、WindowBuilder Pro(也是eclipse插件,Google贡献出来的)
支持GWT,SWT,Swing超级强悍,以前有个叫SWT Designer
http://code.google.com/intl/zh-CN/javadevtools/download-wbpro.html
这儿有离线下载包:
http://www.eclipse.org/windowbuilder/download.php