Switch with CentOS7 series + JDK-9.0.1 + JDK1.8.Press Enter to select the currentOr enter the selection number: 2 ** javac command ** #Check alternatives for javac command&Change to the setting to use jdk11 by specifying "2" OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode) OpenJDK Runtime Environment 18.9 (build 11+28) Press Enter to select the currentOr enter the selection number: 3 If multiple versions are installed, you can switch the Java version to use with alternatives. $ alternatives -install /usr/bin/javac javac /usr/lib/java/jdk-11/bin/javac 1 $ alternatives -install /usr/bin/java java /usr/lib/java/jdk-11/bin/java 1 #Register the command to be used in alternatives The binary file is published on, so download and unzip it.Īfter decompressing, move it to any folder and register it in alternatives. Method 3: Install from binary file (Java 9 or later)įor Java 9 or later, install from the OpenJDK binary file. The rpm file can also be downloaded from the following. Like the yum command, it is automatically registered in alternatives. The rpm file is distributed at, so download it and then install it in the following order. However, depending on the installation environment, it may be necessary to install dependent packages other than Java in advance. This is a method of downloading and installing the rpm file from a distribution site, etc., and is effective when installation is not possible with the yum command, such as when the Internet is not connected (of course, downloading is done from a terminal connected to the Internet). $ sudo yum install java-1.8.0-openjdk-devel #java from yum repository-1.8.0-Search for openjdk packages In addition, it is automatically registered in alternatives. The installation destination is ``` / usr / lib / jrm /` ``. It's the easiest because you just type the command. sudo yum -y install java-11-openjdk java-11-openjdk-devel Once OpenJDK 11 is installed, confirm it works by checking the version. A memorandum when installing OpenJDK on CentOS7 OpenJDK installation Method 1: Install with the yum command Oracle JDK includes compiler but compiler for OpenJDK 11 is included in openjdk-devel. OpenJDK is a free and open-source implementation of the Java Platform, Standard Edition licensed under the GNU General Public License version 2.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |