I have openjdk, scala and sbt, all installed via brew. I'm trying to get setup to work on the scala track on exercism. I'm having no troubles with Java or anything that uses the JVM like clojure, but when I try to test my installation of scala by running the test for the exercism hello example:
$ sbt test
I get a bunch of errors that seem to start with this:
java.io.IOError: java.lang.RuntimeException: /packages cannot be represented as URI
My installed versions are as follows:
$ java --version openjdk 13.0.1 2019-10-15 OpenJDK Runtime Environment AdoptOpenJDK (build 13.0.1+9) OpenJDK 64-Bit Server VM AdoptOpenJDK (build 13.0.1+9, mixed mode, sharing) $ scala -version Scala code runner version 2.13.1 -- $ sbt --version sbt version in this project: 1.3.8 sbt script version: 1.3.8
I've looked and seen this error in a few questions but not seen a way to fix it.
I solved the issue by installing a java version of 1.8 and set JAVA_HOME towards this version.
export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_251.jdk/Contents/Home"
I've got the same issue on IntelliJ IDEA and solved it with
Settings > Build, Exec... > Build Tools > sbt > JRE > set to 1.8.
JAVA_HOME
has not resolve it in my case
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With