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
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.
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.
Try going to Preferences -> Compiler
and select Eclipse, rather than using javac.
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.
In my case, the problem was I reused the "out" directory for program output. I solved it by redirect the output to another folder.
Open your Idea File --> Project Structure --> Modules ,and then choose problematic module,in the "Paths" tab change selected to "Use module compile output path ".