I use Ubuntu 10.04, install JDK, and install eclipse.
References Before installation: ReleaseArticle.
1. Download JDK 7.0 and eclipse
The address is on the official website.
Bytes
2. decompress the Network File
Run the gzip-D ***. targz command to decompress the file as follows:
.
Run the tar vxf ***. tar command to decompress the preceding three files to the corresponding folder.
3. Configure Environment Variables
UseSudo gedit/etc/environment open the editor and add:
Export java_home =/home/Jacky/programs/jdk1.7.0 _ 10
Export jre_home =/home/Jacky/programs/jdk1.7.0 _ 10/JRE
Export classpath = $ classpath: $ java_home/lib: $ java_home/JRE/lib
The installation directory should be changed.
UseSudo gedit/etc/profile open the editor, and thenUmask 022:
Export java_home =/home/Jacky/programs/jdk1.7.0 _ 10
Export jre_home =/home/Jacky/programs/jdk1.7.0 _ 10/JRE
Export classpath = $ classpath: $ java_home/lib: $ java_home/JRE/lib
Export Path = $ java_home/bin: $ java_home/JRE/bin: $ path: $ home/bin
Make changes based on your installation directory.
4. Solve JDK conflicts
After you type Java-version in the command line of the terminal, the following situation occurs:
Program"Java" is included in the following software packages:
* Gcj-4.4-jre-headless
* Openjdk-6-jre-headless
* Cacao * gij-4.3
* Jamvm
Indicates that no default JDK quota is available. (It is said that Ubuntu has JDK by default. You need to configure the default one, but it is not confirmed. I did not find it)
Run the following command on the terminal:
Sudo Update-alternatives -- install/usr/bin/Java/home/Jacky/programs/jdk1.7.0 _ 10/bin/Java 300 sudo Update-alternatives -- install/usr/bin/javac javac/home/Jacky/programs/jdk1.7.0 _ 10/bin/javac 300 sudo Update-alternatives -- config Java
(Enter the path based on your actual situation)
Then, type Java-version in the command line to display it as follows:
Java version "1.7.0 _ 10"
Java (TM) se Runtime Environment (build 1.7.0 _ 10-b18)
Java hotspot (TM) server VM (build 23.6-b04, mixed mode)
JDK 7.0 is successfully installed.
5. Run the tar vxf ***. tar command to decompress the eclipse compressed package to the corresponding directory;
6. Double-click eclipse on the terminal command line or GUI.
The above is my actual installation process and is verified by myself.