Ubuntu11.10 manually download and install JDK 6 (available for test)
Source: Internet
Author: User
Ubuntu11.10 manually download and install JDK 6 (available for test) recently due to development needs, you need to install JDK 6 on ubuntu11.10. here we will summarize the installation process: Step 1: Download JDK 6 from the official sun website, I downloaded the jdk-6u43-linux-x64.bin this time. (Best... ubuntu 11.10 manual download and installation of jdk6 (available for test) recently due to development needs, to install jdk6 on ubuntu 11.10, here to summarize the installation process: Step 1: download JDK 6 from sun's official website. I downloaded the jdk-6u43-linux-x64.bin this time. (It is best to download on ubuntu, if errors occur when files are easily transferred to ubuntu on windows) Step 2: Copy the jdk-6u43-linux-x64.bin to the folder to be installed, here I created a folder jdk6 under the usr/lib/directory, the command is as follows: name @ name:/usr/lib $ mkdir jdk6, then enter the folder where the jdk-6u43-linux-x64.bin is located, run: sudo cp jdk-6u43-linux-x64.bin/usr/lib/jdk6 Step 3: Go to/usr/lib/jdk6: cd/usr/lib/jdk6, Grant jdk-6u43-linux-x64.bin executable permissions: chmod 777 jdk-6u43-linux-x64.bin Step 4: run the jdk-6u43-linux-x64.bin: sudo. /jdk-6u43-linux-x64.bin, a carriage return. Step 5: configure the environment variable execution: sudo gedit/etc/environment modify the following information in environment: PATH = "........ :/usr/lib/jdk6/jdk1.6.0 _ 43/bin "CLASSPATH = ". :/usr/lib/jdk6/jdk1.6.0 _ 43/lib "JAVA_HOME ="/usr/lib/jdk6/jdk1.6.0 _ 43 "Step 6: to set java and javac, you need to perform the following operations because the default jdk exists in ubuntu: sudo update-alternatives -- install/usr/bin/java/usr/lib/jdk6/jdk1.6.0 _ 43/bin/java 300 sudo update-alternatives -- install/usr/bin/javac javac/usr/lib/jdk6/jd K1.6.0 _ 43/bin/javac 300 add the installed JDK to the java menu Step 7: configure the default jdk to execute the code: sudo update-alternatives -- config java: set the system's default JDK as prompted, select the corresponding number, and press enter. Step 8: Test and execute: java-version. The java in the system displayed at this time is the java
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.