Installing JDK under Linux

Source: Internet
Author: User

Download the JDK version of the corresponding system on your own, usually at end of. tar.gz;

1.1 Installation Dependencies
Yum Install glibc.i686
yum–y Install libaio.so.1 libgcc_s.so.1 libstdc++.so.6
Yum Update libstdc++-4.4.7-4.el6.x86_64
Yum Install gcc-c++
1.2 Check that the system has been installed before the JDK software, if installed, uninstall
Rpm–qa | grep–i jdk
parameter explanation: Q means that query a represents all | pipe character I represents ignoring the case JDK program name
rpm–e--nodeps Program name
parameter explanation: E for eraser, erase nodeps to delete dependent other packages
1.3 Installing the JDK
1.3.1 Creating the installation directory
MKDIR–P/USR/LOCAL/JDK
parameter Explanation: p represents the recursive creation of the directory, representing parents, which can be interpreted as:
to create the JDK file, if the/usr/local is present and not created, but does not exist, create
1.3.2 Uploading a JDK installation package
Here you can set up a folder to store the software you need to install in this folder
can be used: mkdir-p/usr/software
1.3.3 Decompression
TAR-ZXVF program file name-c/usr/local/jdk
parameter explanation: Z: Unzip. Gzip end of, X: Extract execution, V: Display procedure, F: This parameter must be the last parameter followed by the name of the file to be decompressed.
1.3.4 Configuring environment variables
Vim/etc/profile Add the following information at the end
Export java_home=/usr/local/java/jdk1.7.0_80
export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
Export path= $JAVA _home/bin: $PATH
1.3.5 Reload environment variable configuration file
Source/etc/profile
1.3.6 test is successful java–version

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.