Tag Archives: AlmaLinux 9.1 JAVA11

AlmaLinux 9.1: How to Install java11

001. system

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

 

 

002. Test java command

[root@PC1 test]#java
bash: java: command not found...
Install package ' java-11-openjdk-headless ' to provide command ' java ' ? [N/y] ^ C               ## The installation is prompted by default
[root@PC1 test]# javac
bash: javac: command not found...
Install package ' java-11-openjdk-devel ' to provide command ' javac ' ? [N/y] ^C                 ## Same as above

 

003. Install directly according to the prompts

[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 - devel.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. Install javac

yum install java- 11 -openjdk-devel.x86_64

 

 

006. Test java and javac commands

java --version
javac --version