'(functional software)


Bloop, VSCode and changing the Java Version

I'm using Bloop and VSCode to develop my Scala applications. Bloop integrates nicely with SBT and via a build server lowers build times and makes development more pleasant. It also integrates nicely with VSCode via the Metals extension.

As it support multiple build tools (Maven, SBT, ...) it needs to 'Import' a project before it gets built by Bloop. This is documented here.

This also stores the path to the current JVM (JAVA_HOME) in some config file. That means when upgrading java and deleting the old version, bloop run and other commands fail with errors like

Missing java executable at /Library/Java/JavaVirtualMachines/openjdk-14.0.2.jdk/Contents/Home/bin/java

The solution is easy: Re-importing the project will pick up the new JVM and fix the error.