steps
- Set up a Java version in PATH:
eval $(cs java --jvm adopt:11 --env)
- Generate the BSP config:
sbt bspConfig
- Switch to another Java version:
eval $(cs java --jvm adoptium:11 --env)
- Open Metals and connect to sbt as the build server
problem
The sbt server starts with adopt:11.
expectation
The sbt server should start with the current Java version in PATH.
notes
Also if the Java version is removed, sbt server will fail to start.