bash: java: command not found

[root@izm5eab8t820b79js38tbxz ~]# java -version
-bash: java: command not found

出现上面问题,解决方法:

[root@izm5eab8t820b79js38tbxz ~]# source /etc/profile

  最后在测试是否安装成功:

[root@izm5eab8t820b79js38tbxz ~]# java -version
java version "1.8.0_241"
Java(TM) SE Runtime Environment (build 1.8.0_241-b07)
Java HotSpot(TM) 64-Bit Server VM (build 25.241-b07, mixed mode)
[root@izm5eab8t820b79js38tbxz ~]# 

 

你可能感兴趣的:(bash: java: command not found)