Configure IntelliJ to compile Java files in a non-Java project 关注
One of the directories contains a java file I'd like to compile and run.
Is this possible? As a work around, I copied the file to a Java maven project and compiled and ran it there.
I'm using IntelliJ Ultimate 2021.2.4
Just mark the parent folder of .java file as sources and set Java SDK for the module.
Thanks Konstantin, it worked perfectly!