Install JDK and eclipse in ubuntu10.4

Source: Internet
Author: User
To learn about hadoop, it is easier to install JDK and eclipse in ubuntu10.4 and JDK and eclipse in windows, but it is different to install JDK and eclipse in Ubuntu, record down only when Note 1, to the Oracle site to download the latest version of jdk1.6 for linux version jdk-6u31-linux-i586.bin, did not download jdk1.7, because hadoop does not support 1.7 temporarily. 2. Install Ubuntu 10.43 in VMware and create a directory in Ubuntu. My directory is/home/Shu/soft and JDK is taken to this directory, after VMware Tools is installed, the VM and the sender can copy files to each other. 4. The default jdk-6u31-linux-i586.bin has no permission to change its permissions, the command is as follows: CD/home/Shu/soft chmode U + x jdk-6u31-linux-i586.bin when executing this command, you will be asked to enter the administrator password, Enter enter 5, execute bin/jdk-6u31-linux-i586.bin command, the system will install JDK, until after the press enter 6, configure environment variables, execute the command: sudo gedit/etc/environment. In the Open configuration file, enter the following: Classpath = "/home/Shu/soft/jdk1.6.0 _ 31/lib" Java_home = "/home/Shu/soft/jdk1.6.0 _ 31" in the configuration file, the path contains information and is appended; /home/Shu/soft/jdk1.6.0 _ 31/bin note: the principle of path in the environment variables of Windows is the same.

 

7. After the installation is complete, run Java-version. The result is as follows:

Shu @ Ubuntu :~ $ Java

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 the system does not have the default JDK, so the system still needs to download the software containing the JDK command. Modify the existing JDK as the default JDK.

Note: Some people on the Internet say that it is because Ubuntu already has the default JDK. I have checked it for a long time. I also found it in the software already installed in Ubuntu. I found JDK, and my younger brother is a new student, I don't know if the above explanation is correct.

 

8. Execute the following three commands: Sudo Update-alternatives -- install/usr/bin/Java/home/Shu/soft/jdk1.6.0 _ 31/bin/Java 300 Sudo Update-alternatives -- install/usr/bin/javac/home/Shu/soft/jdk1.6.0 _ 31/bin/javac 300 Sudo Update-alternatives -- config Java 9. After execution, run Java-version as follows: Shu @ Ubuntu :~ /Soft/jdk1.6.0 _ 31 $ Java-version Java version "1.6.0 _ 31" Java (TM) se Runtime Environment (build 1.6.0 _ 31-b04) Java hotspot (TM) client VM (build ipv6-b01, mixed mode, sharing) indicates that JDK has been installed successfully. Install eclipse-jee-indigo-sr2-linux-gtk.tar in eclipse 10133 and copy eclipse to the/home/Shu/soft directory, 11, because the downloaded eclipse is a tar file, just extract it, execute: tar-zxvf eclipse-jee-indigo-SR2-linux-gtk.tar after execution, create eclipse folder in soft, enter the folder, open it directly.
Related Article

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.