まず定番の
apt update
を行い最新状態にします。
その後、
apt-cache search openjdk
でJDKのパッケージを探し、結果である下の図から、(私の場合)
openjdk-11-dbg - Java runtime based on OpenJDK (debugging symbols)
openjdk-11-doc - OpenJDK Development Kit (JDK) documentation
openjdk-11-jdk - OpenJDK Development Kit (JDK)
openjdk-11-jdk-headless - OpenJDK Development Kit (JDK) (headless)
openjdk-11-jre - OpenJDK Java runtime, using Hotspot JIT
openjdk-11-jre-headless - OpenJDK Java runtime, using Hotspot JIT (headless)
openjdk-11-source - OpenJDK Development Kit (JDK) source files
jtreg - Regression Test Harness for the OpenJDK platform
jtreg6 - Regression Test Harness for the OpenJDK platform
libjax-maven-plugin - Using the xjc goal with OpenJDK 11+
openjdk-11-demo - Java runtime based on OpenJDK (demos and examples)
openjdk-11-jre-dcevm - Alternative VM for OpenJDK 11 with enhanced class redefinition
openjdk-11-jre-zero - Alternative JVM for OpenJDK, using Zero
openjdk-17-dbg - Java runtime based on OpenJDK (debugging symbols)
openjdk-17-demo - Java runtime based on OpenJDK (demos and examples)
openjdk-17-doc - OpenJDK Development Kit (JDK) documentation
openjdk-17-jdk - OpenJDK Development Kit (JDK)
openjdk-17-jdk-headless - OpenJDK Development Kit (JDK) (headless)
openjdk-17-jre - OpenJDK Java runtime, using Hotspot JIT
openjdk-17-jre-headless - OpenJDK Java runtime, using Hotspot JIT (headless)
openjdk-17-jre-zero - Alternative JVM for OpenJDK, using Zero
openjdk-17-source - OpenJDK Development Kit (JDK) source files
openjdk-18-dbg - Java runtime based on OpenJDK (debugging symbols)
openjdk-18-demo - Java runtime based on OpenJDK (demos and examples)
openjdk-18-doc - OpenJDK Development Kit (JDK) documentation
openjdk-18-jdk - OpenJDK Development Kit (JDK)
openjdk-18-jdk-headless - OpenJDK Development Kit (JDK) (headless)
openjdk-18-jre - OpenJDK Java runtime, using Hotspot JIT
openjdk-18-jre-headless - OpenJDK Java runtime, using Hotspot JIT (headless)
openjdk-18-jre-zero - Alternative JVM for OpenJDK, using Zero
openjdk-18-source - OpenJDK Development Kit (JDK) source files
openjdk-8-dbg - Java runtime based on OpenJDK (debugging symbols)
openjdk-8-demo - Java runtime based on OpenJDK (demos and examples)
openjdk-8-doc - OpenJDK Development Kit (JDK) documentation
openjdk-8-jdk - OpenJDK Development Kit (JDK)
openjdk-8-jdk-headless - OpenJDK Development Kit (JDK) (headless)
openjdk-8-jre - OpenJDK Java runtime, using Hotspot JIT
openjdk-8-jre-headless - OpenJDK Java runtime, using Hotspot JIT (headless)
openjdk-8-jre-zero - Alternative JVM for OpenJDK, using Zero/Shark
openjdk-8-source - OpenJDK Development Kit (JDK) source files
uwsgi-plugin-jvm-openjdk-11 - Java plugin for uWSGI (OpenJDK 11)
uwsgi-plugin-jwsgi-openjdk-11 - JWSGI plugin for uWSGI (OpenJDK 11)
uwsgi-plugin-ring-openjdk-11 - Closure/Ring plugin for uWSGI (OpenJDK 11)
uwsgi-plugin-servlet-openjdk-11 - JWSGI plugin for uWSGI (OpenJDK 11)
「Openjdk-(バージョン)-jdk」
の中で一番バージョンが新しいもの
私の環境では
openjdk-18-jdk
なので、
apt install openjdk-18-jdk
でインストールできます。
参考にしました!