首页 > 系统相关 >AlmaLinux 9.1中安装java11

AlmaLinux 9.1中安装java11

时间:2022-12-01 18:24:12浏览次数:51  
标签:11 java x86 AlmaLinux openjdk 17.0 64 java11 9.1

 

001、系统

[root@PC1 gatk-4.1.9.0]# cat /etc/redhat-release
AlmaLinux release 9.1 (Lime Lynx)

 

 

002、测试java命令

[root@PC1 test]# java
bash: java: command not found...
Install package 'java-11-openjdk-headless' to provide command 'java'? [N/y] ^C              ## 默认提示了安装
[root@PC1 test]# javac
bash: javac: command not found...
Install package 'java-11-openjdk-devel' to provide command 'javac'? [N/y] ^C                ## 同上

 

003、直接根据提示安装

[root@PC1 test]# java
bash: java: command not found...
Install package 'java-11-openjdk-headless' to provide command 'java'? [N/y] y


 * Waiting in queue...
 * Loading list of packages....
The following packages have to be installed:
 java-11-openjdk-headless-1:11.0.17.0.8-2.el9_0.x86_64  OpenJDK 11 Headless Runtime Environment
Proceed with changes? [N/y] y


 * Waiting in queue...
 * Waiting for authentication...

 

 

004、javac

[root@PC1 test]# yum list java-11*
Last metadata expiration check: 0:24:45 ago on Thu 01 Dec 2022 05:41:24 PM CST.
Installed Packages
java-11-openjdk-headless.x86_64                                             1:11.0.17.0.8-2.el9_0                                          @appstream
Available Packages
java-11-openjdk.x86_64                                                      1:11.0.17.0.8-2.el9_0                                          appstream
java-11-openjdk-demo.x86_64                                                 1:11.0.17.0.8-2.el9_0                                          appstream
java-11-openjdk-devel.x86_64                                                1:11.0.17.0.8-2.el9_0                                          appstream
java-11-openjdk-javadoc.x86_64                                              1:11.0.17.0.8-2.el9_0                                          appstream
java-11-openjdk-javadoc-zip.x86_64                                          1:11.0.17.0.8-2.el9_0                                          appstream
java-11-openjdk-jmods.x86_64                                                1:11.0.17.0.8-2.el9_0                                          appstream
java-11-openjdk-src.x86_64                                                  1:11.0.17.0.8-2.el9_0                                          appstream
java-11-openjdk-static-libs.x86_64                                          1:11.0.17.0.8-2.el9_0                                          appstream
[root@PC1 test]#

 

005、安装javac

yum install java-11-openjdk-devel.x86_64

 

 

006、测试java和javac命令

java --version
javac --version

 

标签:11,java,x86,AlmaLinux,openjdk,17.0,64,java11,9.1
From: https://www.cnblogs.com/liujiaxin2018/p/16942267.html

相关文章

  • 29.1314
    #include<stdio.h>intf(inta[][3]);intmain(){ inta[3][3],i,j; for(i=0;i<3;i++) for(j=0;j<3;j++) scanf("%d",&a[i][j]); f(a);   return0;}intf(i......
  • 29.1073
    #include<stdio.h>intmain(){ intn,b[100],i,j,c=0,k=0; scanf("%d",&n); chara[100]; for(i=0;i<=n;i++) {scanf("%c",&a[i]); } unsignedlonglongret=1,re......
  • 29.1227
    #include<stdio.h>intmain(){ inti,j,n,a[50],b[50],k,l,m; scanf("%d",&n); for(i=0;i<n;i++) {scanf("%d%d",&a[i],&b[i]); } for(i=0;i<n;i++) {for(j=1;j<b[......
  • mac安装java11及 环境配置
    安装参考:https://blog.csdn.net/Mr_Tony/article/details/119840206 配置环境参考:https://blog.csdn.net/weixin_42216205/article/details/123166877安装:1.下载java1......
  • 29.1311
    #include<stdio.h>intf(intx,inty);intd(intx,inty);intmain(){ intn,m,r; scanf("%d%d",&m,&n);printf("%d%d",f(m,n),d(m,n)); return0;} intf(i......
  • 小新学Java11
    一、异常1.1异常概念异常︰指的是程序在执行过程中,出现的非正常的情况,最终会导致JVM的非正常停止。在Java等面向对象的编程语言中,异常本身是一个类,产生异常就是创建异常......
  • 29.1306
    #include<stdio.h>#include<math.h>intmain(){intn,i,j;scanf("%d",&n);for(i=2;i<=n;i++){for(j=2;j<=i;j++){if(i%j==0)break;}if(j==i){printf("%d\n",i);}......
  • 29.1307
    #include<stdio.h>#include<math.h>intmain(){intn,i,j,a[10];for(i=0;i<10;i++)scanf("%d",&a[i]);for(i=0;i<10;i++){for(j=i+1;j<10;j++){if(a[i]>a[j]){n=a[......
  • 29.1308
    #include<stdio.h>#include<math.h>intmain(){intn=0,m=0,i,j,a[10][10];for(i=0;i<3;i++){for(j=0;j<3;j++){scanf("%d",&a[i][j]);}}for(i=0;i<3;i++)n+=a[i]......
  • centos7安装rabbitmq3.9.16
    下载erlangwget--content-disposition--no-check-certificatehttps://packagecloud.io/rabbitmq/erlang/packages/el/7/erlang-23.3.4.11-1.el7.x86_64.rpm/download.......