I previously have the Java OpenJDK 11, and the JDK 17 installed on my system. Recently, I explored sdkman
in managing versions. However, I got stuck after setting my current version to Java 21, using sdkman
.
- How do I find the runtime paths of previous versions, given they are installed outside of sdkman?
I am trying to get it to work with Neovim:
local JAVA_RUNTIME_PATHS = {
{
name = "JavaSE-21",
path = HOME .. "/.sdkman/candidates/java/21-open/",
},
{
name = "JavaSE-17",
path = HOME .. "/.asdf/installs/java/corretto-17.0.4.9.1",
},
}
Thank you.
I could only find the OpenJDK 21 in sdkman candidates:
$ which java
whose results is:
$USER/.sdkman/candidates/java/current/bin/java
$ java -version
openjdk version "21" 2023-09-19
OpenJDK Runtime Environment (build 21+35-2513)
OpenJDK 64-Bit Server VM (build 21+35-2513, mixed mode, sharing)