Installation and configuration of JDK without installation in CentOS

Time:2021-4-20

First of all, download the installation free from the official website tar.gz I download jdk-7u75-linux-x64 tar.gz
And unzip it to the / usr / Java / directory. This Java directory was not created by myself

Setting environment variables

VI open file command: VI / etc / profile
Move to the end of the file and insert a blank line: enter the letter o
Enter the following configuration information: (Note: the separator here is a colon, not a semicolon)

Copy code

The code is as follows:

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

Recommended Today

Deeply analyze the principle and practice of RSA key

1、 Preface After experiencing many dark moments in life, when you read this article, you will regret and even be angry: why didn’t you write this article earlier?! Your darkest moments include: 1. Your project needs to be connected with the bank, and the other party needs you to provide an encryption certificate. You have […]