Install jdk7.0 and eclipse in Ubuntu

Source: Internet
Author: User

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.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.