The following guide describes the installation of Java in several versions : Oracle Java 8, OpenJDK 8, OpenJDK 11
On a server running Centos 8.
The reaction comes to execute several commands.
For a start we will search repo.
The reaction execute command:
dnf search jdk
You will get something like this:
Last metadata expiration check: 1:23:41 ago on Wednesday 30 December 2019 02:23:23 AM EST. ========================================================= Summary & Name Matched: jdk ========================================================= java-11-openjdk-demo.x86_64 : OpenJDK Demos 11 java-1.8.0-openjdk-demo.x86_64 : OpenJDK Demos 8 java-11-openjdk-jmods.x86_64 : JMods for OpenJDK 11 java-11-openjdk-src.x86_64 : OpenJDK Source Bundle 11 java-1.8.0-openjdk-src.x86_64 : OpenJDK Source Bundle 8 java-11-openjdk.x86_64 : OpenJDK Runtime Environment 11 copy-jdk-configs.noarch : JDKs configuration files copier java-1.8.0-openjdk.x86_64 : OpenJDK Runtime Environment 8 java-11-openjdk-javadoc.x86_64 : OpenJDK 11 API documentation java-1.8.0-openjdk-javadoc.noarch : OpenJDK 8 API documentation java-11-openjdk-devel.x86_64 : OpenJDK Development Environment 11 java-1.8.0-openjdk-devel.x86_64 : OpenJDK Development Environment 8 java-11-openjdk-headless.x86_64 : OpenJDK Headless Runtime Environment 11 java-1.8.0-openjdk-accessibility.x86_64 : OpenJDK 8 accessibility connector java-1.8.0-openjdk-headless.x86_64 : OpenJDK Headless Runtime Environment 8 java-11-openjdk-javadoc-zip.x86_64 : OpenJDK 11 API documentation compressed in a single archive java-1.8.0-openjdk-javadoc-zip.noarch : OpenJDK 8 API documentation compressed in a single archive ============================================================ Summary Matched: jdk ============================================================= icedtea-web.noarch : Additional Java components for OpenJDK - Java browser plug-in and Web Start implementation
Install OpenJDK 11
dnf install java-11-openjdk-devel.x86_64
We check the Java version of the command:
java -version
the result of the:
openjdk version "11.0.5" 2019-10-15 LTS
OpenJDK Runtime Environment 18.9 (build 11.0.5+10-LTS)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.5+10-LTS, mixed mode, sharing)
Install OpenJDK 8
dnf install java-1.8.0-openjdk-devel
check the version:
java -version
Score:
openjdk version "1.8.0_232" OpenJDK Runtime Environment (build 1.8.0_232-b09) OpenJDK 64-Bit Server VM (build 25.232-b09, mixed mode)
To switch between versions of a Java execute command:
alternatives --config java
I choose the appropriate version number:
There are 2 programs which provide 'java'. Selection Command ----------------------------------------------- 1 java-11-openjdk.x86_64 (/usr/lib/jvm/java-11-openjdk-11.0.5.10-0.el8_0.x86_64/bin/java) *+ 2 java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.232.b09-0.el8_0.x86_64/jre/bin/java) Enter to keep the current selection[+], or type selection number: 1
Installing Oracle Java 8
dnf localinstall jdk-8u231-linux-x64.rpm
Well, check the standard version:
java -version
java version "1.8.0_231"
Java(TM) SE Runtime Environment (build 1.8.0_231-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode)
The guide below describes how to install KeePass on Ubuntu. Całość wykonamy za pomocą kilku poleceń…
Master PDF Editor is a comprehensive PDF program, which includes many features. Oprócz tworzenia i edycji…
Iotop jest prostym narzędziem dla systemów Uniksowych umożliwiającym monitorowanie użycia dowolnego nośnika pamięci flash/hdd/ssd w…
You can separate two or more commands with semicolons (;), Semicolon (;): służy do oddzielania…
Poniższy poradnik opisuje w jaki sposób za pomocą konsoli możemy dokonać edycji danych zdjęcia exif.…
The following guide describes how to install Rocket.Chat on Rocky Linux 8 Całość bardzo prosto zainstalujemy…