If you've downloaded Eclipse from their official website, follow these steps for the installation.//从官网下eclipse压缩包
-
Extract the eclipse.XX.YY.tar.gz using//解压eclipse 文件
tar -zxvf eclipse.XX.YY.tar.gz
-
Become root and Copy the extracted folder to
/opt//移动eclipse至/opt文件夹中
sudo mv eclipse.XX.YY /opt
-
Create a desktop file and install it://创建eclipse.desktop
gedit eclipse.desktop
and copy the following to the
eclipse.desktop
file.//粘贴下述代码到创建的文件中[Desktop Entry] Name=Eclipse Type=Application Exec=env UBUNTU_MENUPROXY=0 eclipse44 Terminal=false Icon=eclipse Comment=Integrated Development Environment NoDisplay=false Categories=Development;IDE; Name[en]=Eclipse
then execute the following command to automatically install it in the unity://使用下述命令安装eclipse.desktop
sudo desktop-file-install eclipse.desktop
-
Create a symlink in
/usr/local/bin
using//建立symlink 我也不懂这是个啥文件 如遇大神 请指教 拜谢
sudo ln -s /opt/eclipse/eclipse /usr/local/bin/eclipse44
-
For eclipse icon to be displayed in dash, eclipse icon can be added as
sudo cp /opt/eclipse/icon.xpm /usr/share/pixmaps/eclipse.xpm
-
Don't forget that you need to have either OpenJDK or Sun Java installed to be able to run eclipse. Check this question for more information about Java installation.Here is a simple example of installing Open JDK 1.6://不要忘记装jdk
-
sudo apt-get install openjdk-6-jdk
-
Launch eclipse and then give it the required permissions to modify the osgi file:
sudo chown -R $USER:$USER /opt/eclipse/configuration/org.eclipse.osg