Can't install elasticsearch due to java 18 not installing


configure: Found potential Boot JDK using java(c) in PATH
configure: Potential Boot JDK found at /usr/lib/jvm/java-19-openjdk is incorrect JDK version (openjdk version "19.0.1" 2022-10-18 OpenJDK Runtime Environment (build 19.0.1+10) OpenJDK 64-Bit Server VM (build 19.0.1+10, mixed mode)); ignoring
configure: (Your Boot JDK version must be one of: 17 18)
configure: Found potential Boot JDK using well-known locations (in /usr/lib/jvm/java-8-openjdk)
configure: Potential Boot JDK found at /usr/lib/jvm/java-8-openjdk is incorrect JDK version (openjdk version "1.8.0_352" OpenJDK Runtime Environment (build 1.8.0_352-b08) OpenJDK 64-Bit Server VM (build 25.352-b08, mixed mode)); ignoring
configure: (Your Boot JDK version must be one of: 17 18)
configure: Found potential Boot JDK using well-known locations (in /usr/lib/jvm/java-19-openjdk)
configure: Potential Boot JDK found at /usr/lib/jvm/java-19-openjdk is incorrect JDK version (openjdk version "19.0.1" 2022-10-18 OpenJDK Runtime Environment (build 19.0.1+10) OpenJDK 64-Bit Server VM (build 19.0.1+10, mixed mode)); ignoring
configure: (Your Boot JDK version must be one of: 17 18)
configure: Found potential Boot JDK using well-known locations (in /usr/lib/jvm/java-11-openjdk)
configure: Potential Boot JDK found at /usr/lib/jvm/java-11-openjdk is incorrect JDK version (openjdk version "11.0.17" 2022-10-18 OpenJDK Runtime Environment (build 11.0.17+1) OpenJDK 64-Bit Server VM (build 11.0.17+1, mixed mode)); ignoring
configure: (Your Boot JDK version must be one of: 17 18)
configure: Found potential Boot JDK using well-known locations (in /usr/lib/jvm/default-runtime)
configure: Potential Boot JDK found at /usr/lib/jvm/default-runtime is incorrect JDK version (openjdk version "19.0.1" 2022-10-18 OpenJDK Runtime Environment (build 19.0.1+10) OpenJDK 64-Bit Server VM (build 19.0.1+10, mixed mode)); ignoring
configure: (Your Boot JDK version must be one of: 17 18)
configure: Found potential Boot JDK using well-known locations (in /usr/lib/jvm/default)
configure: Potential Boot JDK found at /usr/lib/jvm/default is incorrect JDK version (openjdk version "19.0.1" 2022-10-18 OpenJDK Runtime Environment (build 19.0.1+10) OpenJDK 64-Bit Server VM (build 19.0.1+10, mixed mode)); ignoring
configure: (Your Boot JDK version must be one of: 17 18)
configure: Could not find a valid Boot JDK. OpenJDK distributions are available at http://jdk.java.net/.
configure: This might be fixed by explicitly setting --with-boot-jdk
configure: error: Cannot continue
configure exiting with result code 1
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: java18-openjdk (jre18-openjdk-headless jre18-openjdk jdk18-openjdk)

Have you already tried setting a different JVM as your default ?

(only while installing)
suggested: 17 instead of 19 :wink:

https://wiki.archlinux.org/title/java#Switching_between_JVM

It seems you need java 17(LTS) to install java 18 :face_with_raised_eyebrow:

Have you tried installing Java 18 with pacman beforehand ?

:footprints: