Installing JDK under Linux

Source: Internet
Author: User

Prerequisite: Install Rzsz for uploading local files

Yum-y Install Lrzsz

First step: Uninstall Linux's own JDK first

Java–version #查看自带jdk的版本rpm-qa | grep Java #查看自带jdk

Unloading:

Rpm-e--nodeps java-1.7.0-openjdk-1.7.0.45-2.4.3.3.el6.x86_64rpm-e--nodeps Java-1.6.0-openjdk-1.6.0.0-1.66.1.13.0.el6.x86_64

Step two: Start uploading, unpacking, installing

Mkdir/usr/local/src/java

RZ #上传自己的jdk

TAR-XVF jdk-7u71-linux-i586.tar.gz #解压上传的jdk

Step Three: Configure environment variables

Vim/etc/profile #查看系统配置文件

#在行末尾添加这一段:

#set java environmentjava_home=/usr/local/src/java/jdk1.7.0_71classpath=.: $JAVA _home/lib.tools.jarpath= $JAVA _ Home/bin: $PATHexport java_home CLASSPATH PATH

The only thing to note here is the JDK version, don't write it wrong, modify it according to your own version.

Save the exit after the modification is complete!

Fourth step: Make the configuration of the changes take effect immediately, use the following command

Source/etc/profile

Fifth step: View the version of the JDK

Java-version

See that it is installed on its own version of the installation is complete!


This article is from the "Simple Life" blog, so be sure to keep this source http://simplelife.blog.51cto.com/9954761/1740139

Installing JDK under Linux

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.