CentOS7 install OracleJDK and JRE

JDK (Java Development Kit) refers to the Java development kit. JDK is the core of Java, including Java basic class library, Java runtime environment (JRE) and Java development tools. It is necessary to install for Java development.
JRE (Java Runtime Environment) refers to the Java runtime environment. The support of JRE is required when running Java programs. If the system only installs JRE, it means that the system can run any Java program, but cannot do Java development.

JDK1.8 installation#

1、 First download the oracleJDK1.8 compressed package###

# mkdir /usr/java``# cd /usr/java``# wget http://download.oracle.com/otn-pub/java/jdk/8u111-b14/jdk-8u111-linux-x64.tar.gz``# tar -xzf jdk-8u111-linux-x64.tar.gz``# rm -rv jdk-8u111-linux-x64.tar.gz

2、 Environment variable configuration###

Edit the configuration file through the vi /etc/profile command

# vi /etc/profile

Add at the end of the text:

export JAVA_HOME=/usr/java/jdk1.8.0_111
 export PATH=$JAVA_HOME/bin:$PATH
 export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

3、 Restart the centos system###

Enter># java -version to check whether the JDK is installed successfully

Version Information

# java``#javac
Display syntax help information

JRE installation#

Content can refer to JDK

Recommended Posts

CentOS7 install OracleJDK and JRE
Install centos7 and connect
centos7 install python3 and ipython
Know Linux and install CentOS
CentOs7.3 compile and install Nginx 1.9.9
CentOS 7 install Mono and MonoDevelop
CentOS6.5 install Java 8 and Tomcat8
Centos compile and install Git
CentOS7 install python3 and pip3
CentOS6.5 install Java 8 and Tomcat8
CentOS6 install and crack Jira 7
CentOS6.5 install Java 8 and Tomcat8
Centos7 compile and install ntp-4.2.8p11
CentOS 6.9 compile and install python
CentOS6 install and crack confluence
CentOS 6 compile and install python 3
CentOS6 install and crack Jira 7
1.5 Install Centos7
Centos 7 install jdk and package service service
CentOS7 yum install and start mysql
Install and configure keepalived under CentOS 5.9
CentOS Yum compile and install MySQL 5.6
Compile and install LAMP under Centos 5.2
CentOS 8 install Git and basic configuration
CentOS 6.x compile and install Nginx
CentOS7 compile and install L(A|N)MP environment
CentOS7.3 install iptables and detailed use
CentOS quickly install Python3 and pip3
CentOS7 yum install and start mysql
CentOS 8 - install and configure NFS service
Centos7 and centos8 install mysql5.6 5.7 8.0 so simple
Centos7 uninstall openJdk, and install JDK1.8
Install Python3 and ansible under CentOS8
Install and use docker under CentOS 6.8
CentOS7 install and use SQL Server
CentOS Minimal install and configure TIPS
Install Python3 and Py under CentOS7
Install and configure FreeIPA in Centos7
Linux CentOS6 compile and install Pyt
virtualBox install centos, and build tomcat
Install Mono 3.2 and Jexus 5.4 under CentOS 6.3
Centos6 install Python2.7.13
Centos7.3 install nginx
CentOS7.2 install Mysql5.7.13
CentOS install Redmine
Centos7 install Python 3.6.
CentOS7 install MySQL
Centos7 install protobuf
CentOS 7 install Docker
CentOS7 install GlusterFS
CentOS 7.4 install Zabbix 3.4
CentOS7 install Docker
CentOS install Python 3.6
Vmware install CentOS6
centos7 install docker-ce 18.01.0
CentOS 7.2 install MariaDB
CentOS7.5 source code compile and install mysql5.7.29
CentOS 7 install Hadoop 3.0.0
Centos7 install Python2.7
Centos 7.6 install seleniu
Centos7 install LAMP+PHPmyadmin