Intellij suddenly throwing ClassNotFoundException

前端 未结 10 1686
栀梦
栀梦 2020-12-08 14:30

I\'m at a complete loss here. I have a project on an external hard drive called LenseProject. Inside LenseProject, I have .idea, lib, Natives

相关标签:
10条回答
  • 2020-12-08 14:55

    I know its a bit old post but for me helped by going to Run-->Edit Configurations--> In Application Selected your main code file --> Configuration on the right panel. Checked "Use alternative JRE:" and selecting JDK folder called jre(.../Java/jdk.x.x.x_xx/jre). Apply and OK. I am really new with intelliJ but that solved my problem hope it helps someone.

    0 讨论(0)
  • 2020-12-08 14:55

    File -> Project Structrure -> Project. Change the Project Language level from "SDK default" to Actual version that you are using.

    This is weird, but solves the problem.

    0 讨论(0)
  • 2020-12-08 14:57

    Try going to Preferences -> Compiler and select Eclipse, rather than using javac.

    0 讨论(0)
  • 2020-12-08 14:58

    My problem was, that all this renaming the project-structure, my Maven dependencies didn't mach.

    After changing the maven dependencies in the pom file, it worked.

    0 讨论(0)
  • 2020-12-08 14:59

    In my case, the problem was I reused the "out" directory for program output. I solved it by redirect the output to another folder.

    0 讨论(0)
  • 2020-12-08 15:03

    Open your Idea File --> Project Structure --> Modules ,and then choose problematic module,in the "Paths" tab change selected to "Use module compile output path ".

    0 讨论(0)
提交回复
热议问题