[JAVA] OpenJDK installation

Since the Oracle JDK will be charged, I tried installing OpenJDK accordingly

Prerequisites

The environment is CentOS 7 OpenJDK version is 11

procedure

From RPM

  1. Run the following yum command

    # yum install java-11-openjdk java-11-openjdk-devel
    
  2. Set JAVA_HOME

    # echo "JAVA_HOME=$(readlink -f /usr/bin/java | sed "s:bin/java::")" | tee -a /etc/profile \
    

&& source /etc/profile ```

Bonus: Japanese font installation

  1. Run the following yum command

    # yum install ipa-gothic-fonts-* ipa-pgothic-fonts-* ipa-mincho-fonts-* ipa-pmincho-fonts-* vlgothic-fonts-* vlgothic-p-fonts-*
    
  2. Download the IPA font

    # curl -LkvfOJ https://ipafont.ipa.go.jp/IPAfont/IPAfont00303.zip && curl -LkvfOJ https://ipafont.ipa.go.jp/IPAexfont/IPAexfont00401.zip
    
  3. Unfold and place

    # unzip IPAfont00303.zip \
    

&& unzip IPAexfont00401.zip
&& mkdir -p $JAVA_HOME/lib/fonts/fallback
&& cp -a IPAfont00303/.ttf $JAVA_HOME/lib/fonts/fallback/
&& cp -a IPAexfont00401/
.ttf $JAVA_HOME/lib/fonts/fallback/ ```

When using a tar file

  1. Download the OpenJDK tar file

    # curl -LkvOf https://download.java.net/java/GA/jdk11/13/GPL/openjdk-11.0.1_linux-x64_bin.tar.gz
    
  2. Check for damage

    # sha256sum openjdk-11.0.1_linux-x64_bin.tar.gz
    

7a6bb980b9c91c478421f865087ad2d69086a0583aeeb9e69204785e8e97dcfd openjdk-11.0.1_linux-x64_bin.tar.gz ``` 3. Extract the tar file

```sh
# tar zxf openjdk-11.0.1_linux-x64_bin.tar.gz
```
  1. Place it anywhere and pass the path

reference

-Official documentation --How to download and install prebuilt OpenJDK packages

Recommended Posts

OpenJDK installation
OpenJDK 11 installation memo
OpenJDK installation on CentOS 7
AppCDS @ OpenJDK
Docker installation
Windows version of OpenJDK installation procedure
Wildfly installation
Gradle installation
java installation
Java installation jdk
First CentOS 8 installation
OpenJDK 11 Flight Recorder
iPLAss installation summary