To install the JDK:
1. Download a ready-to-use JDK compression package. : http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
Select the corresponding JDK version according to the version of the system. The author chooses the jdk-8u102-linux-x64.tar.gz
2. Unzip the downloaded compressed package
TAR-ZXVF jdk-8u102-linux-x64.tar.gz
3. Setting Environment variables
Edit/.BASHRC File
Gedit ~/.BASHRC at the end of the file add:
Export Java_home=.../jdk1.8export classpath=${java_home}/libexport path=${java_home}/bin: $PATH
PS: The value of the first java_home is the absolute path of the JDK after decompression
Make the modified BASHRC file effective: source ~/.BASHRC
After this step in the terminal input: Java-version confirm whether the installation was successful.
Install Eclipse:
1. Download one of the available eclipse compression packages
2. Same decompression
3. Open the unpacked folder to run eclipse, if prompted without the Java environment:
First, Java-version does not have to install Java
Second, java-version can print the version information, then in the Eclipse.ini in the Evmargs before adding the following two lines,
-vm
/jdk1.6.0_45/bin (Java path)
To modify the Eclipse icon:
sudo gedit/usr/share/applications/eclipse.desktop
sudo gedit/usr/share/applications/eclipse.desktop then type in the file that pops up:
Java code
[Desktop Entry]
Encoding=utf-8
Name=eclipse Platform
Comment=eclipse IDE
Exec=.../eclipse/eclipse
icon=.../eclipse/icon.xpm
Terminal=false
Startupnotify=true
Type=application
Categories=application;development;
Utuntu under Installation eclipse+jdk