首先聲明,eclipse luna 和mars 樓主親測可用。
1.安裝Eclipse2.0版本的插件支持
方法如下:
Help -> Install New Software... -> Work with
-> 選擇“The Eclipse Project Updates - http://download.eclipse.org/eclipse/updates/4.4”
-> 勾選"Eclipse Tests, Examples, and Extras" 下的 "Eclipse 2.0 Style Plugin Support"
如果不進行這一步直接安裝fatjar會報錯,錯誤內容如下:
- An error occurred while installing the items
- session context was:(profile=epp.package.jee, phase=org.eclipse.equinox.internal.p2.engine.phases.Install, operand=null --> [R]net.sf.fjep.fatjar 0.0.31, action=).
- Failed to prepare partial IU: [R]net.sf.fjep.fatjar 0.0.31.
2. 安裝fatjar
推薦在線安裝方式,另外還有一種安裝方式是將fatjar插件下載到本地,然後放入eclipse的文件夾中,該方法可用性有待檢驗。
在線安裝方式如上述方式相同:
在線安裝步驟:
eclipse菜單欄 Help -> Install New Software... -> Work with
輸入:fatjat - http://kurucz-grafika.de/fatjar
然後一直 next,重啓之後就可以了!
如果重啓之後,仍沒有看到你期待的fatjar圖標,不要急,新建一個工程,鼠標右鍵改工程,應該就有了!
Good Luck!