"Ubuntu" Ubuntu installation Jdk1.6 graphics

Source: Internet
Author: User

1, to the official website download Jdk-6u32-linux-x64.bin
2, copy files to Ubuntu desktop, if installed Vmtools, drag directly to the desktop, as shown in the figure:


3. In the/usr/lib/directory, create a new Java folder, as shown in figure:

cd/usr/lib/  
sudo mkdir java

4. Copy the Jdk-6u32-linux-x64.bin file to the/usr/lib/java directory.
CD ~  
CD desktop/  
sudo cp jdk-6u32-linux-x64.bin/usr/lib/java/  

5, modify the Jdk-6u32-linux-x64.bin permissions.
sudo chmod 777 Jdk-6u32-linux-x64.bin  

6. Run the bin file.
The picture shown below should be successful.


7, to this step/usr/lib/java directory has a folder


8, modify/etc/profile, add environment variable.


Add the following lines to the open file:
Export JAVA_HOME=/USR/LOCAL/JAVA/JDK1.6.0_32 export   
jre_home=/usr/local/java/jdk1.6.0_32/jre    
Export Classpath=.: $JAVA _home/lib: $JRE _home/lib: $CLASSPATH    
export path= $JAVA _home/bin: $JRE _home/bin: $JAVA _home:$ PATH   

9, do not restart the machine, so that the file just changed into effect.
Source/etc/profile  

10. Set the installed JDK to the default value

sudo update-alternatives--install/usr/bin/java java/usr/lib/java/jdk1.6.0_32/bin/java  
sudo Update-alternatives--install/usr/bin/javac Javac/usr/lib/java/jdk1.6.0_32/bin/javac 300

11. See if the installation is successful

Java-version  


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.