IntelliJ Idea under Linux, No such file or directory on main class

后端 未结 6 674
情深已故
情深已故 2021-02-06 00:10

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

6条回答
  •  离开以前
    2021-02-06 00:47

    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:

    • Add a Java SDK, either OpenJDK 7, or Oracle JDK 6 or 7 (File -> Project structure -> SDKs)
    • Select it as Project SDK (File -> Project structure -> Project)

提交回复
热议问题