Install jdk in Linux (jdk file suffixed with. bin)

Source: Internet
Author: User

To install jdk in Linux (jdk file with the extension. bin:

Cd/usr/lib // open the/usr/lib directory
 
Sudo mkdir jvm // create the directory jvm
 
Sudo chmod 777 jvm // modify jvm Permissions

Cd/usr/lib/jvm // open jvm

Sudo cp jdk-6u33-linux-i586.bin/usr/lib/jvm // copy the jdk-6u33-linux-x64.bin to the jvm directory, manually copy the line should not be required to execute this command
 
Sudo chmod 777 jvm jdk-6u33-linux-x64.bin // modify jdk-6u33-linux-x64.bin Permissions
Sudo sh jdk-6u33-linux-i586.bin // unzip the installation jdk-6u33-linux-i586.bin
Sudo gedit/etc/environment
 
/Etc/environmentPATH = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin: /usr/games:/usr/lib/jvm/jdk1.6.0 _ 33/bin"
 
JAVA_HOME = "/usr/lib/jdk1.6.0 _ 33" CLASSPATH = "/usr/lib/jdk1.6.0 _ 33/lib" // configure Environment Variables
Sudo update-alternatives -- install/usr/bin/java/usr/lib/jvm/jdk1.6.0 _ 33/bin/java 300
Sudo update-alternatives -- install/usr/bin/javac/usr/lib/jvm/jdk1.6.0 _ 33/bin/javac 300
 
Sudo update-alternatives -- config java

Ps: jdk-6u33-linux-i586.bin for jdk version, according to your download change this name, jdk1.6.0 _ 33/bin is extracted install the directory generated after the jdk-6u33-linux-i586.bin, according to the specific situation to modify...

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.