sbt runs on command line but not VS code

Solution for sbt runs on command line but not VS code
is Given Below:

So I’ve been trying to run scala on vs code for nearly a week now with no luck. We have been recommended to use sbt to run our programs.

I’m running java version “1.8.0_301” on my build environment.

when running the sbt command on vs code I get project loading failed with this error:

[error] java.lang.RuntimeException: /packages cannot be represented as URI

What’s weird is that I can run sbt on my command line with no problems!
I’m pretty new to this so any help would be greatly appreciated. (link to the vs code window after failed loading and scala running on terminal)


This is an error that occurs with outdated sbt versions. Upgrade to the latest sbt version and you should be fine.
Unfortunately I don’t recall exactly when this was fixed.