I am trying to follow some tutorials to learn more about Scala and I am trying to use it in IntelliJ in my computer (MacBook Pro M1). I installed sdk using sdkman. However, I get certain errors regarding it and I don't know how to fix this.
EDIT: Following a suggestion below, more info about how I installed this:
I am trying the Introduction to Scala course on LinkedIn Learning. I installed the community version (Apple Sillicon) of IntelliJ available here, then Scala using the command curl -fL https://github.com/coursier/launchers/raw/master/cs-x86_64-apple-darwin.gz | gzip -d > cs && chmod +x cs && (xattr -d com.apple.quarantine cs || true) && ./cs setup
available here. Finally, I used curl -s "https://get.sdkman.io" | bash
and source "$HOME/.sdkman/bin/sdkman-init.sh"
to install SDK, following what is available here.
After all that, the error below appears when I go into terminal and write sbt -version
or if I try to run something in IntelliJ:
java.lang.ClassCastException: class java.lang.UnsupportedOperationException cannot be cast to class xsbti.FullReload (java.lang.UnsupportedOperationException is in module java.base of loader 'bootstrap'; xsbti.FullReload is in unnamed module of loader 'app')
at sbt.internal.XMainConfiguration.run(XMainConfiguration.java:59)
at sbt.xMain.run(Main.scala:46)
at xsbt.boot.Launch$.$anonfun$run$1(Launch.scala:149)
at xsbt.boot.Launch$.withContextLoader(Launch.scala:176)
at xsbt.boot.Launch$.run(Launch.scala:149)
at xsbt.boot.Launch$.$anonfun$apply$1(Launch.scala:44)
at xsbt.boot.Launch$.launch(Launch.scala:159)
at xsbt.boot.Launch$.apply(Launch.scala:44)
at xsbt.boot.Launch$.apply(Launch.scala:21)
at xsbt.boot.Boot$.runImpl(Boot.scala:78)
at xsbt.boot.Boot$.run(Boot.scala:73)
at xsbt.boot.Boot$.main(Boot.scala:21)
at xsbt.boot.Boot.main(Boot.scala)
[error] [launcher] error during sbt launcher: java.lang.ClassCastException: class java.lang.UnsupportedOperationException cannot be cast to class xsbti.FullReload (java.lang.UnsupportedOperationException is in module java.base of loader 'bootstrap'; xsbti.FullReload is in unnamed module of loader 'app')
I have no idea what this means and how to fix this. Could someone help me, please?
sbt.version = 1.5.5
. How can I update those build.properties? Do I simply write there 1.7.1 in the place of the 1.5.5 and then I just reopen my project? – Grisette