linux 安装JDK的方法分享

java-教程王 Java教程 发布时间:2022-01-17 09:33:01 阅读数:15556 1
傻瓜安装方式分享

步骤一:获取java版本

[root@localhost opt]# yum -y list java*
已加载插件:fastestmirror
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
Determining fastest mirrors
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.dgut.edu.cn
可安装的软件包
java-1.6.0-openjdk.x86_64                               1:1.6.0.41-1.13.13.1.el7_3                  base   
java-1.6.0-openjdk-demo.x86_64                          1:1.6.0.41-1.13.13.1.el7_3                  base   
java-1.6.0-openjdk-devel.x86_64                         1:1.6.0.41-1.13.13.1.el7_3                  base   
java-1.6.0-openjdk-javadoc.x86_64                       1:1.6.0.41-1.13.13.1.el7_3                  base   
java-1.6.0-openjdk-src.x86_64                           1:1.6.0.41-1.13.13.1.el7_3                  base   
java-1.7.0-openjdk.x86_64                               1:1.7.0.261-2.6.22.2.el7_8                  base   
java-1.7.0-openjdk-accessibility.x86_64                 1:1.7.0.261-2.6.22.2.el7_8                  base   
java-1.7.0-openjdk-demo.x86_64                          1:1.7.0.261-2.6.22.2.el7_8                  base   
java-1.7.0-openjdk-devel.x86_64                         1:1.7.0.261-2.6.22.2.el7_8                  base   
java-1.7.0-openjdk-headless.x86_64                      1:1.7.0.261-2.6.22.2.el7_8                  base   
java-1.7.0-openjdk-javadoc.noarch                       1:1.7.0.261-2.6.22.2.el7_8                  base   
java-1.7.0-openjdk-src.x86_64                           1:1.7.0.261-2.6.22.2.el7_8                  base   
java-1.8.0-openjdk.i686                                 1:1.8.0.312.b07-1.el7_9                     updates
java-1.8.0-openjdk.x86_64                               1:1.8.0.312.b07-1.el7_9                     updates
java-1.8.0-openjdk-accessibility.i686                   1:1.8.0.312.b07-1.el7_9                     updates
java-1.8.0-openjdk-accessibility.x86_64                 1:1.8.0.312.b07-1.el7_9                     updates
java-1.8.0-openjdk-demo.i686                            1:1.8.0.312.b07-1.el7_9                     updates
java-1.8.0-openjdk-demo.x86_64                          1:1.8.0.312.b07-1.el7_9                     updates
java-1.8.0-openjdk-devel.i686                           1:1.8.0.312.b07-1.el7_9                     updates
java-1.8.0-openjdk-devel.x86_64                         1:1.8.0.312.b07-1.el7_9                     updates
java-1.8.0-openjdk-headless.i686                        1:1.8.0.312.b07-1.el7_9                     updates
java-1.8.0-openjdk-headless.x86_64                      1:1.8.0.312.b07-1.el7_9                     updates
java-1.8.0-openjdk-javadoc.noarch                       1:1.8.0.312.b07-1.el7_9                     updates
java-1.8.0-openjdk-javadoc-zip.noarch                   1:1.8.0.312.b07-1.el7_9                     updates
java-1.8.0-openjdk-src.i686                             1:1.8.0.312.b07-1.el7_9                     updates
java-1.8.0-openjdk-src.x86_64                           1:1.8.0.312.b07-1.el7_9                     updates
java-11-openjdk.i686                                    1:11.0.13.0.8-1.el7_9                       updates
java-11-openjdk.x86_64                                  1:11.0.13.0.8-1.el7_9                       updates
java-11-openjdk-demo.i686                               1:11.0.13.0.8-1.el7_9                       updates
java-11-openjdk-demo.x86_64                             1:11.0.13.0.8-1.el7_9                       updates
java-11-openjdk-devel.i686                              1:11.0.13.0.8-1.el7_9                       updates
java-11-openjdk-devel.x86_64                            1:11.0.13.0.8-1.el7_9                       updates
java-11-openjdk-headless.i686                           1:11.0.13.0.8-1.el7_9                       updates
java-11-openjdk-headless.x86_64                         1:11.0.13.0.8-1.el7_9                       updates
java-11-openjdk-javadoc.i686                            1:11.0.13.0.8-1.el7_9                       updates
java-11-openjdk-javadoc.x86_64                          1:11.0.13.0.8-1.el7_9                       updates
java-11-openjdk-javadoc-zip.i686                        1:11.0.13.0.8-1.el7_9                       updates
java-11-openjdk-javadoc-zip.x86_64                      1:11.0.13.0.8-1.el7_9                       updates
java-11-openjdk-jmods.i686                              1:11.0.13.0.8-1.el7_9                       updates
java-11-openjdk-jmods.x86_64                            1:11.0.13.0.8-1.el7_9                       updates
java-11-openjdk-src.i686                                1:11.0.13.0.8-1.el7_9                       updates
java-11-openjdk-src.x86_64                              1:11.0.13.0.8-1.el7_9                       updates
java-11-openjdk-static-libs.i686                        1:11.0.13.0.8-1.el7_9                       updates
java-11-openjdk-static-libs.x86_64                      1:11.0.13.0.8-1.el7_9                       updates
java-atk-wrapper.i686                                   0.30.4-5.el7                                base   
java-atk-wrapper.x86_64                                 0.30.4-5.el7                                base   
java_cup.noarch                                         1:0.11a-16.el7                              base   
java_cup-javadoc.noarch                                 1:0.11a-16.el7                              base   
java_cup-manual.noarch                                  1:0.11a-16.el7                              base   
javacc.noarch                                           5.0-10.el7                                  base   
javacc-demo.noarch                                      5.0-10.el7                                  base   
javacc-javadoc.noarch                                   5.0-10.el7                                  base   
javacc-manual.noarch                                    5.0-10.el7                                  base   
javacc-maven-plugin.noarch                              2.6-17.el7                                  base   
javacc-maven-plugin-javadoc.noarch                      2.6-17.el7                                  base   
javamail.noarch                                         1.4.6-8.el7                                 base   
javamail-javadoc.noarch                                 1.4.6-8.el7                                 base   
javapackages-tools.noarch                               3.4.1-11.el7                                base   
javassist.noarch                                        3.16.1-10.el7                               base   
javassist-javadoc.noarch                                3.16.1-10.el7                               base   
[root@localhost opt]# 

选择指定的java版本进行安装

[root@localhost opt]# yum install -y java-1.8.0-openjdk-devel.x86_64
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.dgut.edu.cn
base                
使用以上两种方式,即可实现傻瓜的linux jdk安装
版权声明

本文仅代表作者观点,不代表本站立场。
本文系作者授权发表,未经许可,不得转载。

本文链接: https://www.Java265.com/JavaCourse/202201/2242.html

最近发表

热门文章

好文推荐

Java265.com

https://www.java265.com

站长统计|粤ICP备14097017号-3

Powered By Java265.com信息维护小组

使用手机扫描二维码

关注我们看更多资讯

java爱好者