Ubuntu system with OPENJDK, enter the Java-version command in the terminal, there will be some prompts, which have no effect on the rear installation is to let you understand the main
1
# First to http://www.oracle.com/technetwork/java/javase/downloads/download JDK, I downloaded the latest version of jdk-8u20-linux-i586.tar.gz, download complete use command
sudo tar zxvf jdk-8u20-linux-i586.tar.gz
Extract
2
# then copy the Unpacked Jdk1.8.0_20 folder into the/USR/LIB/JVM directory
3
# Configure Environment variables
At the end add:
Export JAVA_HOME=/USR/LIB/JVM/JDK1.8.0_20
Then save the shutdown, using the source update
SOURCE ~/.profile
To view the value of a java_home using the ENV command
Env
If java_home=/usr/lib/jvm/jdk1.8.0_20 is displayed, the configuration is successful.
4
# Modify the system default JDK, as follows
sudo update-alternatives--install/usr/bin/java java/usr/lib/jvm/jdk1.8.0_20/bin/java-
sudo Update-alternatives--install/usr/bin/javac Javac/usr/lib/jvm/jdk1.8.0_20/bin/javac-
sudo Update-alternatives--config java
sudo update-alternatives--config javac
5
To view the Java version information,
Terminal input Java-version
If you see the following message, modify OK:
Java Version "1.8.0_20"
Java (TM) SE Runtime Environment (build 1.8.0_20-b26)
Java HotSpot (TM) Client VM (build 25.20-b23, Mixed mode)
6
Ubuntu Install configuration Eclipse
Go to the official website http://developer.android.com/sdk/index.html download Eclipse package adt-bundle-linux-x86-20140702.zip, download and extract to the folder you want to put on it.
Decompression command Unzip Adt-bundle-linux-x86-20140702.zip
I put it in the/home/kingqi/adt directory.
7
Link Eclipse execution file symbols to/usr/local/bin.
Cd/usr/local/bin
sudo ln-s/home/kingqi/adt/adt-bundle-linux-x86-20140702/eclipse/eclipse
OK, you're done, open the terminal and enter Eclipse to start.