在Centos8下配置Java开发环境

Step1. download JDK
from this website
https://www.oracle.com/technetwork/java/javase/archive-139210.html
(I choosed JavaSE 9)

Step2. unzip the tar.gz file
input command "tar -zvxf jdk-9.0.4_linux-x64_bin.tar.gz"in terminal

Step3. make a directory named java under /usr/local
input command "mkdir /usr/local/java"in terminal

Step4. copy the extracted directory to /usr/local/java
input command"cp -r jdk-9.0.4 /usr/local/java"in terminal

Step5. add something to the file named profile
input command"vim /etc/profile"in terminal
add the content underneath at the end of file:

#Java
export JAVA_HOME=/usr/local/java/jdk-9.0.4
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin

Step6. make changes effective
input command"source /etc/profile" in order to make changes effecitve.

Done!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值