Compile android source code 3 --- install JDK 6 on ubuntu

Source: Internet
Author: User

Compile android source code 3 --- install JDK 6 on ubuntu
For Android 2.3 and later versions, JDK 6, that is, JDK 1.6, must be used instead of copying files to/urs/lib/jvm.

Cd download

Sudo su

Sudo cp jdk-6u45-linux-x64.bin/usr/lib/jvm

2. jdk-6u45-linux-x64.bin File Installation

# Chmod 777 jdk-6u45-linux-x64.bin grants the current user permission to execute


#. Jdk-6u45-linux-x64.bin.bin

3. Change the environment variable 4. Configure the default JDK version

Sudo update-alternatives -- install/usr/bin/java/usr/lib/jvm/javaxxx/bin/java 300

Sudo update-alternatives -- install/usr/bin/javac/usr/lib/jvm/javaxxx/bin/javac 300

Sudo update-alternatives -- install/usr/bin/jar/usr/lib/jvm/javaxxx/bin/jar 300

Sudo update-alternatives -- install/usr/bin/javah/usr/lib/jvm/javaxxx/bin/javah 300

Sudo update-alternatives -- install/usr/bin/javap/usr/lib/jvm/javaxxx/bin/javap 300

Run sudo update-alternatives -- config java

Switch to jdk 1.6.0 _ 45

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.