System is Ubuntu 20 on WSL2. asdf version: 0.8.1 installed with brew
As seen below, I can execute java
and sbt
, but scala
claims the JAVA_HOME
is incorrect.
~> java --version
openjdk 17 2021-09-14
OpenJDK Runtime Environment (build 17+35-2724)
OpenJDK 64-Bit Server VM (build 17+35-2724, mixed mode, sharing)
~> sbt --version
sbt version in this project: 1.5.5
sbt script version: 1.5.5
~> scala --version
Error: JAVA_HOME is not defined correctly.
We cannot execute /home/craig/.asdf/shims/bin/java
~> echo $JAVA_HOME
/home/craig/.asdf/shims
~> ls /home/craig/.asdf/shims
common jarsigner javac javap jconsole jdeprscan jfr jimage jlink jmod jps jshell jstat keytool rmiregistry sbt-launch.jar sbtn-x86_64-apple-darwin sbtn-x86_64-pc-win32.exe scalac serialver
jar java javadoc jcmd jdb jdeps jhsdb jinfo jmap jpackage jrunscript jstack jstatd project sbt sbt.bat sbtn-x86_64-pc-linux scala scaladoc target
~>
It would appear that scala
expects java
to be in <shims dir>/bin
, but as shown, there is no bin
.
I haven't found open issues related to this with asdf
. However, if JAVA_HOME
is incorrect, then java
and sbt
should not work either.
So, is this a problem with my system, asdf
itself or the scala asdf
plugin, or something else? I'm at a loss.