1. Install jdk1. first download the jdk-6u37-linux-x64.bin to the directory/usr/lib/jvm/(can be another directory) sudochmod + xjdk-6u37-linux-x64.binsudo. /jdk-6u37-linux-x64.bin # will create the directory jdk1.6.0 _ 37 in the directory where the installation file is located and
1. Install jdk
1. First download the jdk-6u37-linux-x64.bin to the directory/usr/lib/jvm/(can be another directory)
Sudo chmod + x jdk-6u37-linux-x64.bin
Sudo./jdk-6u37-linux-x64.bin # creates a directory named jdk1.6.0 _ 37 in the directory where the installation file is located and decompress it to the directory.
Test
Lvstone @ lvstone-VPCS1300C :~ $ Java-version
Java version "1.6.0 _ 37"
Java (TM) SE Runtime Environment (build 1.6.0 _ 37-b06)
Java HotSpot (TM) 64-Bit Server VM (build HotSpot 12-b01, mixed mode)
2. Configure Environment Variables
Sudo gedit/etc/profile or/etc/environment or ~ /. Bashrc or ~ /. Profile
Open a file
Before umask 022 at the end, enter:
Export JAVA_HOME =/usr/lib/jvm/jdk1.6.0 _ 37
Export JRE_HOME =/usr/lib/jvm/jdk1.6.0 _ 37/jre
Export CLASSPATH =.: $ JAVA_HOME/lib: $ JRE_HOME/lib: $ CLASSPATH
Export PATH = $ JAVA_HOME/bin: $ JRE_HOME/bin: $ PATH
3. Modify the default jdk In Ubuntu. The default JDK may exist in ubuntu, such as openjdk.
Update-alternatives -- install/usr/bin/java/usr/lib/jvm/jdk1.6.0 _ 37 300
Update-alternatives -- install/usr/bin/javac/usr/lib/jvm/jdk1.6.0 _ 37 300
In this step, add the installed jdk to the java menu.
Update-alternatives -- config java # select the default jdk
Check
Java-version
Ii. Install ipvs
1. Download eclipse address: http://www.eclipse.org/downloads/
64 bit linux: Eclipse IDE for Java Developers, eclipse-java-juno-SR1-linux-gtk-x86_64.tar.gz 149 MB,
This is a basic package for javaSE Development. It is generally recommended to download the classic version, but it is also said that the classic version has a problem when installing the ADT (Android Development Tools) plug-in, it cannot be installed automatically.
2. Unzip, tar zvxf eclipse-java-helios-SR1-linux-gtk.tar.gz
After decompression, an eclipse directory appears. This directory is the installed eclipse. Enter this directory and execute the eclipse file to start eclipse.