Ubuntu中安裝Eclipse Java EE的方法

來源:互聯網
上載者:User

標籤:ati   ref   編輯器   highlight   無法   jdk   eclips   class   一點   

先決條件,系統中已有JDK。Ubuntu內建了OpenJDK。

Ubuntu軟體庫中的Eclipse居然是基礎版,只有JDT和PDE,無法開發J2EE程式,這一點不及fedora,所以只能手工安裝Eclipse Java EE版。

1. 到eclipse.org下載適用於ubuntu的eclipse壓縮包,對於32-bit系統,最新版的eclipse壓縮包的檔案名稱應該是eclipse-jee-kepler-SR1-Linux-gtk.tar.gz,下載的壓縮包放在~/downloads目錄下;

2. 解壓縮eclipse到/usr/share目錄:進入終端視窗,輸入命令sudo tar -zxvf eclipse-jee-kepler-SR1-linux-gtk.tar.gz -C /usr/share。這時會提示輸入密碼,照做即可;

3. 將eclipse加入到ubuntu的應用菜單中(就像建立Windows開始菜單中的程式組):

3.1. 在終端視窗中輸入命令:sudo gedit /usr/share/applications/eclipse.desktop

3.2. 在編輯器中輸入以下文字:

[plain] view plain copy
  1. [Desktop Entry]  
  2. Name=Eclipse Java EE  
  3. Comment=Eclipse IDE for Java EE  
  4. Exec=/usr/bin/eclipse  
  5. Icon=/usr/share/eclipse/icon.xpm  
  6. Terminal=false  
  7. Type=Application  
  8. Categories=Application;Development;  

4. 在/usr/bin中建立eclipse的執行指令碼:

4.1. 在終端視窗中執行命令:sudo gedit /usr/bin/eclipse

4.2. 在gedit編輯器中輸入以下內容:

[plain] view plain copy
  1. #!/bin/sh  
  2.   
  3. export ECLIPSE_HOME="/usr/share/eclipse"  
  4.   
  5. $ECLIPSE_HOME/eclipse $*  


4.3. 將eclipse執行指令碼設定為可執行檔:sudo chmod 755 /usr/bin/eclipse

OK!

Ubuntu中安裝Eclipse Java EE的方法

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.