I\'m running IntelliJ Idea under linux. I have created a project and a module inside it, and in that module I have a class (MyClass.class) and when I\'m trying to run it from ID
I experienced the same problem. What I found is that the underlying system-wide Java version doesn't matter, so there is no need to set JAVA_HOME or update_alternatives. All I had to do was change some settings in IDEA:
File -> Project structure -> SDKs)File -> Project structure -> Project)