current position:Home>JDK1.8 deployment under Linux system

JDK1.8 deployment under Linux system

2022-06-24 09:14:52Write casually

  1. take jdk Installation package jdk-8u191-linux-x64.tar.gz Uploaded to the /usr/local And decompress
 [[email protected] ~]# cd /usr/local
 [[email protected] local]# tar -zxvf jdk-8u191-linux-x64.tar.gz
  1. Configure environment variables
 [[email protected] ~]# vi /etc/profile

Add... At the end of the open file

 export JAVA_HOME=/usr/local/jdk1.8.0_191
 export JRE_HOME=${JAVA_HOME}/jre
 export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
 export PATH=$JAVA_HOME/bin:$PATH   

Save and exit , Then enter the following command to make it effective

 [[email protected] ~]# source /etc/profile 
  1. Enter the following command to view jdk Whether the deployment is successful
 [[email protected] ~]# java -version

copyright notice
author[Write casually],Please bring the original link to reprint, thank you.
https://en.cdmana.com/2022/175/202206240756302452.html

Random recommended