歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux綜合 >> Ubuntu Linux >> Ubuntu安裝eclipse,並創建桌面快捷方式,ubuntueclipse

Ubuntu安裝eclipse,並創建桌面快捷方式,ubuntueclipse

日期:2017/3/3 17:30:40   编辑:Ubuntu Linux

Ubuntu安裝eclipse,並創建桌面快捷方式,ubuntueclipse


熱度3 評論 176 www.BkJia.Com 網友分享於: 2017-02-22 04:02:39 浏覽數6073次

Ubuntu安裝eclipse,並創建桌面快捷方式,ubuntueclipse


系統:Ubuntu 16.04

JDK版本:1.8.0_121

  Ubuntu下安裝JDK配置環境變量可見我的這篇文章 http://www.cnblogs.com/AloneZ/p/Ubuntu1.html


1.官網下載eclipse,我的版本是eclipse-jee-neon-2-linux-gtk-x86_64.tar.gz,只要JDK版本高,其他版本也可以

2.移動並解壓到/java目錄下

sudo mv eclipse-jee-neon-2-linux-gtk-x86_64.tar.gz /java         //移動到/java
cd /java                                //進入/java目錄
tar -zxvf eclipse-jee-neon-2-linux-gtk-x86_64.tar.gz       //解壓

3.在/java/eclipse目錄下運行命令

./eclipse

可以正常打開說明安裝完成,如果出錯說明jdk沒有配置正確


然而每次都這樣用命令運行很麻煩,但eclipse並沒有啟動圖標,那麼我們自己做一個

1.UBuntu的菜單圖標保存在/usr/share/applications目錄下,所以先在該目錄下建一個eclipse.desktop文件

sudo gedit /usr/share/applications/eclipse.desktop

2.在文件中輸入以下內容

[Desktop Entry]
Encoding=UTF-8
Name=Eclipse Platfrom          //圖標名字,可改
Comment=Eclipse IDE
Exec=/java/eclipse/eclipse      //Eclipse文件夾下eclipse的路徑
Icon=/java/eclipse/icon.xpm    //Eclipse文件夾下圖標icon.xpm的路徑
Terminal=false
StartupNotify=true
Type=Application
Categories=Application;Development;

3.對該文件進行賦權

chmod u+x /usr/share/applications/eclipse.desktop

4.發現多出了eclipse的圖標了,雙擊可運行,復制到桌面就可以

注:如果出現找不到jdk,jre說明環境變量沒有配置正確

http://www.bkjia.com/Linuxjc/1194749.html TechArticle

Copyright © Linux教程網 All Rights Reserved