Configure IntelliJ to compile Java files in a non-Java project 关注
已回答
I have a catch all git repo that has code snippets from many technologies. Javascript, Java, SpringBoot, Groovy, PHP, CSS, Bash, WSH.
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!