JAVA: rpm 安装jdk8

rpm -ivh jdk-8u281-linux-x64.rpm 

[root@localhost scripts]# which java
/bin/java
[root@localhost scripts]# rm -f /bin/java
[root@localhost scripts]# rm -f /bin/javac
[root@localhost scripts]# rm -f /etc/alternatives/java
[root@localhost scripts]# rm -f /etc/alternatives/javac
[root@localhost scripts]# cd /bin
[root@localhost bin]# ln -s -f /usr/java/jdk1.8.0_281-amd64/bin/java
[root@localhost bin]# ln -s -f /usr/java/jdk1.8.0_281-amd64/bin/javac
[root@localhost bin]# java -version

猜你喜欢

转载自blog.csdn.net/amadeus_liu2/article/details/114310702