Detailed tutorial on installing JDK8 on Linux system (CentOS7 installation)

Detailed tutorial on installing JDK8 on Linux system (CentOS7 installation)

JDK Installation

I won't go into too much detail about system installation. You can find the installation steps online. However, I recommend that you choose the desktop graphical format for installation to facilitate some operations. At the same time, choose English mode during the installation process. At the same time, I found that using the Oracle VM VirtualBox virtual machine tool is more convenient than using VM tools for development.

Use the tools

System: CentOS7_64 bit (recommended to use the minimum configuration command window)
Jdk: jdk1.8.0_191
Virtual Machine: Oracle VM VirtualBox
Document writing tool: EditPlus
File transfer tool: FileZilla
Connect to Linux system tool: Xshell5 (recommended, but use with caution, paid software)
Sunflower remote connection operation tool

File Path

Link: https://pan.baidu.com/s/1qu71DDVXvU3kBEg-cgBpKw

Extraction code: hn1u

1. Upload the jdk file (/develop/package)

2. Uninstall jdk (centOS will have its own jdk version)

1) Query all Java (If you use the minimum configuration command line, you can install it directly if you cannot find any Java)

rpm -qa | grep java

2) Delete the java files other than the three ones

rpm -e --nodeps java-1.7.0-openjdk-1.7.0.111-2.6.7.8.el7.x86_64
rpm -e --nodeps java-1.8.0-openjdk-1.8.0.102-4.b14.el7.x86_64
rpm -e --nodeps java-1.8.0-openjdk-headless-1.8.0.102-4.b14.el7.x86_64
rpm -e --nodeps java-1.7.0-openjdk-headless-1.7.0.111-2.6.7.8.el7.x86_64

3) After deleting, query using command

rpm -qa | grep java

3. Unzip JDK

tar -zxvf jdk-8u191-linux-x64.tar.gz -C ../

4. Configure environment variables (using EditPlus)

Open /etc/profile
Add the following code at the end #java environment
export JAVA_HOME=/develop/jdk1.8.0_191
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin

5. Make the modified configuration take effect

source /etc/profile

6. Check whether the configuration is successful

java -version

javac

Summarize

The above is a detailed tutorial on how to install JDK8 on Linux system (CentOS7 installation) introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • Detailed tutorial on installing CentOS, JDK and Hadoop on VirtualBox
  • Linux system (Centos6.5 and above) installation jdk tutorial analysis
  • Graphical tutorial on installing JDK1.8 under CentOS7.4
  • Install JDK8 in rpm mode on CentOS7
  • CentOS8 installation tutorial of jdk8 / java8 (recommended)
  • Tutorial on deploying jdk and tomcat on centos7 without interface
  • Linux centOS installation JDK and Tomcat tutorial
  • Centos installation jdk case explanation

<<:  Vue3.0 handwriting magnifying glass effect

>>:  Detailed analysis of the MySQL slow log opening method and storage format

Recommend

Let's talk about the problem of Vue integrating sweetalert2 prompt component

Table of contents 1. Project Integration 1. CDN i...

Detailed use cases of MySql escape

MySQL escape Escape means the original semantics ...

How to add ansible service in alpine image

Use apk add ansible to add the ansible service to...

BUG of odd width and height in IE6

As shown in the figure: But when viewed under IE6...

How to build a DHCP server in Linux

Table of contents 1. Basic knowledge: 2. DHCP ser...

MySQL 8.0.22 installation and configuration method graphic tutorial

This article records the installation and configu...

Detailed explanation of three ways to connect Docker containers to each other

There are three ways to interconnect and communic...

How to use positioning to center elements (web page layout tips)

How to center an element in the browser window He...

Common methods and problems of Docker cleaning

If you use docker for large-scale development but...

How to use resident nodes for layer management in CocosCreator

CocosCreator version: 2.3.4 Most games have layer...