Create the installation directory sudomkdir/usr/lib/jvm3, decompress the file package tarzxvf./jdk-7u25-linux-x64.tar.gz-C/usr/lib/jvm4, configure the environment variable gedit ~ /. Bashrc under the file... 1. download JDK from the official network. download jdk-7u25-linux-x64.tar.gz 2 and create the installation directory.
Sudo mkdir/usr/lib/jvm
3. decompress the package
Tar zxvf./jdk-7u25-linux-x64.tar.gz-C/usr/lib/jvm
4. configure the environment variable gedit ~ /. Bashrc
Add the following content at the bottom of the file: export JAVA_HOME =/usr/lib/jvm/jdk1.7.0 _ 25
3 export JRE_HOME =$ {JAVA_HOME}/jre4export CLASSPATH =.: $ {JAVA_HOME}/lib :$ {JRE_HOME}/lib5export PATH =$ {JAVA_HOME}/bin: $ PATH 5. close the terminal and open it again. run the following command:
1update-alternatives -- install/usr/bin/java/usr/lib/jvm/jdk1.7.0 _ 25/bin/java 3002update-alternatives -- install/usr/bin/javac/usr/lib/jvm /jdk1.7.0 _ 25/bin/javac 300 and then enter: update-alternatives -- config java and then you will see: Select 2 and then OK ~ Haha ~ 6. enter java-version on the terminal.
JDK replaced ~
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