Eclipse 3.7 3.x SWT/Jface 開發環境搭建

來源:互聯網
上載者:User

1、準備工作

1.1、下載eclipse

http://www.eclipse.org/downloads/

目前的版本是eclipse-jee-indigo-SR1-win32

解壓到d:\java\ide\eclipse-jee-indigo-SR1-win32


1.2、下載swt

http://eclipse.org/swt/

下載win32版本,結果是個zip檔案


2、匯入org.eclipse.swt 項目

運行eclipse,菜單中點擊

file -> import -> general-exsiting projects to workspace -> next -> select archive file -> 選取下載的文——點擊browse,會出現項目org.eclipse.swt->next

匯入成功


3、建立SWT項目

file -> new -> javaproject ...

右鍵點擊項目properties -> java build path -> projects -> 點add,把org.eclipse.swt項目加進來

OK,可以寫SWT程式了


4、加入Jface支援

同3

properties -> java build path ->Libraries-> add external JARs..或Add Library

加入以下jar包:(jar包在eclipse安裝目錄的plugins子目錄中找)

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


為解決jface的中文問題,還要加上

org.eclipse.jface.nl1_3xx.jar

詳見http://www.cnblogs.com/jifeng/archive/2011/10/15/2213615.html


OK

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.