Install eclipse in Ubuntu and create a desktop shortcut, ubuntueclipse

Source: Internet
Author: User
Tags gtk

Install eclipse in Ubuntu and create a desktop shortcut, ubuntueclipse

System: Ubuntu 16.04

JDK version: 1.8.0 _ 121

Install JDK under Ubuntu to configure environment variables to see my article http://www.cnblogs.com/AloneZ/p/Ubuntu1.html

1.The official website downloads eclipse, and my website is eclipse-jee-neon-2-linux-gtk-x86_64.tar.gz. As long as the JDK version is high, other versions can also be used.

2. Move and decompress the package to the/java directory.

Sudo mv eclipse-jee-neon-2-linux-gtk-x86_64.tar.gz/java // move to/java
Cd/java // enter the/java directory
Tar-zxvf eclipse-jee-neon-2-linux-gtk-x86_64.tar.gz // unzip

3. Run the command in the/java/eclipse directory.

./eclipse

If it is enabled properly, the installation is complete. If an error occurs, the jdk is not correctly configured.

 

However, it is very troublesome to run commands like this every time, but eclipse does not have a startup icon, so we will make

1. the UBuntu menu icon is saved in the/usr/share/applications directory. Therefore, create an eclipse. desktop file in this directory.

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

2. Enter the following content in the file:

[Desktop Entry] Encoding = UTF-8Name = Eclipse Platfrom // icon name, comment = Eclipse IDEExec =/java/eclipse // Eclipse path Icon =/java/eclipse/icon in the eclipse folder. xpm // Eclipse folder icon. xpm path Terminal = falseStartupNotify = trueType = ApplicationCategories = Application; Development;

3. Assign permissions to the file

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

4. The eclipse icon is displayed, and you can double-click it to run it. Copy it to the desktop.

 

NOTE: If jdk cannot be found, jre indicates that the environment variable is not correctly configured.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.