$ sudo dpkg -i jdk-17_linux-x64_bin.deb
$ cd /usr/lib/jvm $ sudo sh -c "cat .java-1.11.0-openjdk-amd64.jinfo | sed -s "s/java-11-openjdk-amd64/jdk-17/g" > .jdk-17.jinfo"
name=jdk-17
priority=1700
section=main
hl java /usr/lib/jvm/jdk-17/bin/java
hl jjs /usr/lib/jvm/jdk-17/bin/jjs
hl keytool /usr/lib/jvm/jdk-17/bin/keytool
hl rmid /usr/lib/jvm/jdk-17/bin/rmid
hl rmiregistry /usr/lib/jvm/jdk-17/bin/rmiregistry
hl pack200 /usr/lib/jvm/jdk-17/bin/pack200
hl unpack200 /usr/lib/jvm/jdk-17/bin/unpack200
hl jexec /usr/lib/jvm/jdk-17/lib/jexec
jdkhl jar /usr/lib/jvm/jdk-17/bin/jar
jdkhl jarsigner /usr/lib/jvm/jdk-17/bin/jarsigner
jdkhl javac /usr/lib/jvm/jdk-17/bin/javac
jdkhl javadoc /usr/lib/jvm/jdk-17/bin/javadoc
jdkhl javap /usr/lib/jvm/jdk-17/bin/javap
jdkhl jcmd /usr/lib/jvm/jdk-17/bin/jcmd
jdkhl jdb /usr/lib/jvm/jdk-17/bin/jdb
jdkhl jdeprscan /usr/lib/jvm/jdk-17/bin/jdeprscan
jdkhl jdeps /usr/lib/jvm/jdk-17/bin/jdeps
jdkhl jfr /usr/lib/jvm/jdk-17/bin/jfr
jdkhl jimage /usr/lib/jvm/jdk-17/bin/jimage
jdkhl jinfo /usr/lib/jvm/jdk-17/bin/jinfo
jdkhl jlink /usr/lib/jvm/jdk-17/bin/jlink
jdkhl jmap /usr/lib/jvm/jdk-17/bin/jmap
jdkhl jmod /usr/lib/jvm/jdk-17/bin/jmod
jdkhl jps /usr/lib/jvm/jdk-17/bin/jps
jdkhl jrunscript /usr/lib/jvm/jdk-17/bin/jrunscript
jdkhl jshell /usr/lib/jvm/jdk-17/bin/jshell
jdkhl jstack /usr/lib/jvm/jdk-17/bin/jstack
jdkhl jstat /usr/lib/jvm/jdk-17/bin/jstat
jdkhl jstatd /usr/lib/jvm/jdk-17/bin/jstatd
jdkhl rmic /usr/lib/jvm/jdk-17/bin/rmic
jdkhl serialver /usr/lib/jvm/jdk-17/bin/serialver
jdkhl jaotc /usr/lib/jvm/jdk-17/bin/jaotc
jdkhl jhsdb /usr/lib/jvm/jdk-17/bin/jhsdb
jdk jconsole /usr/lib/jvm/jdk-17/bin/jconsole
多少、Java 11 → 17 で廃止されたコマンドも入っているけど気にしない。rmic とか$ sudo update-java-alternatives -l java-1.11.0-openjdk-amd64 1111 /usr/lib/jvm/java-1.11.0-openjdk-amd64 jdk-17 1700 /usr/lib/jvm/jdk-17
$ cat .jdk-17.jinfo | grep -E "^(hl|jdkhl|jdk)" | awk '{print "/usr/bin/"$2 " " $2 " " $3 " 1700"}' \ | xargs -t -n4 sudo update-alternatives --verbose --install
$ sudo update-java-alternatives -l java-1.11.0-openjdk-amd64 1111 /usr/lib/jvm/java-1.11.0-openjdk-amd64 jdk-17 1700 /usr/lib/jvm/jdk-17 $ sudo update-java-alternatives -s jdk-17 $ java --version java 17.0.3 2022-04-19 LTS Java(TM) SE Runtime Environment (build 17.0.3+8-LTS-111) Java HotSpot(TM) 64-Bit Server VM (build 17.0.3+8-LTS-111, mixed mode, sharing) $ javac --version javac 17.0.3善か
$ tar xf jetbrains-toolbox-1.23.11849.tar.gz $ cd jetbrains-toolbox-1.23.11849/ $ ./jetbrains-toolbox-1.23.11849/jetbrains-toolbox
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.example</groupId>
<artifactId>Sandbox</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<mainClass>org.example.Main</mainClass>
</configuration>
</plugin>
</plugins>
</build>
</project>