Before installing eclipse, you need to ensure that your system already has a Java operating environment, and this article installs the JDK and eclipse as an example of a clean system installation of Eclipse for the first time.
1. Download the JDK Archive package: http://www.oracle.com/technetwork/java/javase/downloads/index.html
Suppose the save location is:/home/darren/downloads/jdk-8u20-linux-x64.tar.gz
2. Extract the compressed package to the specified installation directory, such as/usr
$ cd/sutar -xzvf/home/darren/downloads/jdk-8u20-linux-x64. tar. gz
3. Generate a directory named jdk1.8.0_20 and rename it to JDK, this step is optional
MV Jdk1. 8. 0_20/ jdk/
4. Modify the/etc/profile file to add environment variables
$ vim/etc/profile
Add the following at the end of the text (to be configured according to the actual installation location of the personal JDK)
Export java_home=/usr/jdkexport java_bin=/usr/jdk/binexport PATH= $PATH: $JAVA _home/Binexport CLASSPATH=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jarexport java_home java_bin PATH CLASSPATH
5. Make the/etc/profile file effective immediately after modification, you can use the following command (note ".") Space between the "/" and "/")
6. Verify that the JDK installation is successful and look at the Java version
$ java-version
7. Download eclipse:http://www.eclipse.org/downloads/
Assuming the download location is the same as the JDK
8. Install Eclipse, the installation location is also the/usr directory
$ cd/sutar -xzvf/home/darren/downloads/eclipse-standard-luna-r-linux-gtk-x86 _64. tar. gz
9. Run Eclipse
$ cd/eclipse$. /eclipse
Installing JDK and Eclipse under Linux