Installing JDK for Linux

Inexplicable sadness 2022-05-22 12:04:58 阅读数:284

installingjdklinux

1、 Download installation package

jdk1.8-1.8.0_221-fcs.x86_64.tar.gz

2、 Upload to server

/opt/jdk

3、 decompression

[[email protected] jdk]# tar -zxvf jdk-8u281-linux-x64.tar.gz

4、 Configure environment variables

[[email protected] jdk]# vim /etc/profile
# java
export JAVA_HOME=/opt/jdk/jdk1.8.0_281
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib

Refresh

source /etc/profile

5、 verification

java -version

 6、 success

copyright:author[Inexplicable sadness],Please bring the original link to reprint, thank you. https://en.javamana.com/2022/142/202203140551543418.html