intellij is unable to recognize class with class name Main (Main.java)
If I edit a class name to Main (Main.java),
intellij shows it as broken file.
If I attempt to create new class called Main,
IntelliJ gives me a popup box:
"Unable to parse template “Class”
Error message: Selected class file name 'Main.java' mapped to not java file type 'XML' "
The main concern is that IntelliJ can't recognize old projects which consist of Main.java
I already tried to add this
"-Djdk.util.zip.ensureTrailingSlash=false" to <IDE_HOME>\bin\idea64.exe.vmoptions (for the default 64-bit JVM)
and then File -> Invalidate Caches/Restart
Still don't work
intellij think (Main.java) is XML file.
If I rename (Main.java) to any other name,
intellij is able to recognize it as class.
How to fix it?
Thanks