Build a SUNJAVA development environment under Ubuntu10.04

Source: Internet
Author: User
The following is the building SUNJAVA configuration steps under Ubuntu10.04 install open-jdk-6, sudoapt-getinstallopen-jdk-6 (I do not know why not install this can not run java and javac command !!!) Download the jdk-6u20-linux-i586.bin file from Oracle to copy the jdk-6u20-linux-i586.bin to the/usr/lib/jvm/java folder

The following describes how to configure sun java in Ubuntu 10.04.

Install the open-jdk-6, sudo apt-get install open-jdk-6 (I don't know why this doesn't run java and javac commands !!!)

Go to Oracle official website to download jdk-6u20-linux-i586.bin files

Copy the jdk-6u20-linux-i586.bin to the/usr/lib/jvm/java folder

Run sudo chmod a + x jdk-6u20-linux-i586.bin

Run sudo./jdk-6u20-linux-i586.bin

Press enter until yes/no is displayed. Then, enter yes and press Enter. The jdk1.6.0 _ 20 directory is displayed. Www.linuxidc.com

OK. jdk has been installed.

Run the code on the terminal: sudo gedit/etc/environment

Add the following variables:

JAVAHOME =/usr/lib/jvm/java/jdk1.6.0 _ 20

PATH = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games: /usr/lib/jvm/java/jdk1.6.0 _ 20/bin"

CLASSPATH =.:/usr/lib/jvm/java/jdk1.6.0 _ 20/lib

Next, set the default jdk. because another jdk may exist by default, run the code on the terminal:

Sudo update-alternatives -- install/usr/bin/java/usr/bin/jvm/java/jdk1.6.0 _ 20/bin/java 300

Sudo update-alternatives -- install/usr/bin/javac/usr/bin/jvm/java/jdk1.6.0 _ 20/bin/javac 300

Enter sudo update-alternatives -- config java and select the corresponding jdk

Enter java-version to check whether it is sun's jdk. So far, sun-jdk has been successfully installed.

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.