当前位置:网站首页>How to uninstall openjdk and install Oracle JDK under CentOS
How to uninstall openjdk and install Oracle JDK under CentOS
2022-04-21 13:29:00 【Lovely hair】
Write it at the front
commonly Linux The system will bring its own JDK, nothing but Open JDk, What we usually use in development is Oracle JDK, So we need to write in Open JDK, And then install Oracle JDK

One 、 uninstall Open JDK
The next operation needs to be in root Under permission
1、 It is recommended to switch to root Account
# Switch to root Account
su -
2、 Query whether the system can install jdk
rpm -qa|grep java

3、 Uninstall installed jdk
# reminder , The file name is for reference only , The details shall be subject to your own
rpm -e --nodeps java-1.8.0-openjdk-1.8.0.161-2.b14.el7.x86_64
rpm -e --nodeps java-1.8.0-openjdk-headless-1.8.0.161-2.b14.el7.x86_64
4、 Verify that there are jdk
rpm -qa|grep java
java -version

Two 、 install Oracle JDK
-
First download a Linux Version of JDK, Recommended download JDK8, Here is a quick download Mirror website , It's much better than the turtle speed on the official website , Suggest collection !!!
-
First copy the installation package to Centos in , Recommended here Xftp, If you don't know how to use , See my other blog Portal

-
Then decompress jdk Compressed package
# Small Tips:0jdk Knock it out Directly by tab It will be completed automatically ^_^ tar -zxvf jdk-8u202-linux-x64.tar.gz
-
edit /etc/profile file , Configure environment variables
Just put it at the end
# Set Java Envieonment # Just pay attention to JAVA_HOME Change your path to your own , You can copy the rest export JAVA_HOME=/home/jsj/jdk1.8.0_202 export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar export PATH=$PATH:$JAVA_HOME/bin
-
take effect profile
source /etc/profile java -version
Conclusion
It's not easy to create , If it helps you , Give me a free compliment !!!

版权声明
本文为[Lovely hair]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204211324153056.html
边栏推荐
- 焦作市第三人民医院携手美创,开启数据安全建设新局面
- English word analysis of communication protocol
- [digital signal processing] linear constant coefficient difference equation (determine whether the system is a "linear time invariant system" according to "linear constant coefficient difference equat
- 滑动窗口系列-寻找最小覆盖字串
- HCIP之路OSPF拓展配置
- Last online class can be "distracted" by AI analysis. Intel's emotional detection AI is on fire
- 浅析 联邦学习是什么?
- Netease cloud - Mobile authentication code login
- 启牛商学院的课程让小白开户购买国债逆回购,安全嘛?
- 二叉树创建及其线索化
猜你喜欢

Q: How to change the number of appendix in the paper with the text.

Redis data persistence

STM32驱动ST7789V2 tft屏幕

HCIP之路OSPF拓展配置

动手篇 | 如何在麒麟v10 SP2安装达梦8版本数据库

Elements of network

Network communication protocol model

Installing and configuring canal

idea自动生成单元测类
![leetcode:824. Goat Latin [simple string manipulation]](/img/03/22141a079673a37226ada3ba5bc1e3.png)
leetcode:824. Goat Latin [simple string manipulation]
随机推荐
Flash-1.12.0 yarn installation and deployment
Redis frequently asked questions
Mysql 驱动为什么要依赖 protobuf
如何在Centos下卸载OpenJDK,安装Oracle JDK
Upgrade the jdbc driver to version 8.0.28 and connect the pit record of MySQL
How do we media create hot articles and improve reading volume
Fibonacci sequence
Establishment of binary tree and its cueing
Problems encountered by programmers in learning
单体测试使用Assert.assertThat(expected,Matcher matcher)来对比结果和预期
no server suitable for synchronization found
完成数亿元融资后,毫末智行计划超百城落地城市智能驾驶产品
20210818 diary
Detailed explanation and demonstration of 3-4dom shaped XSS
Wang Baiping: my way to envoy maintainer
关于电脑使用慢慢变慢的几大原因分析
Netease cloud - Mobile authentication code login
Technology giants compete to enter, who can become the "number one player" of the meta universe?
Shell programming learning (II) variables and operations
HCIP之路ospf的选路,防环,重发布