Jump to content

intellij is unable to recognize class with class name Main (Main.java)


Pegasus

Recommended Posts

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?:feels:

Thanks:cate:

 

 

Edited by Pegasus
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...