score:1

Accepted answer

found the solution:

the project build of intellij doesn't really care about the path of jdk in env var java_home, it takes the one from project settings, so to solve this i have to:

  • go to file -> project structure (command + ;)
  • on the left select project settings, modules
  • select the module and from module sdk drop list pick one of the compatible sdk like:
  • jdk1.8.0_202 or jdk1.8.0_251, correto1.8 or adoptopenjdk 1.8, ....
  • the ones that does not work with me are:
  • jbr17, correto16, temurin-17, ...

enter image description here

score:0

in my case i had resolved this issue by installing a java version of 1.8 and set java_home to this version.

export java_home="/library/java/javavirtualmachines/jdk1.8.0_251.jdk/contents/home"

score:2

this is a scala compiler bug. please upgrade to the latest scala point release, 2.12.16.


Related Query

More Query from same tag