Pegasus Posted February 16, 2019 Share Posted February 16, 2019 (edited) 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 Edited February 16, 2019 by Pegasus Quote Link to comment Share on other sites More sharing options...
Pegasus Posted February 16, 2019 Author Share Posted February 16, 2019 Well I finally know which keyword to google "intellij How to remove default file type association" Settings > Editor > File Types > Registered Patterns Remove Main.java in Patterns Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.