Java file removed from classpath(?!)


Hello there,

By some "unknown" reason, one file of my project is not being recognized anymore as a source file, and as you can see in the attached picture, the file's icon also changed. I tried to associate it back with a "java editor" but no success. When I try to open it, an empty "editor" is open, but without the code.

The code still there (I can see in other editors), but intellij is not recognizing it and removed it from the classpath. 

How can I fix this? and What happened here?


Comment actions Permalink

The file is mapped to the wrong file type, see for the solution.

Comment actions Permalink

Thanks Serge Baranov

A right click on the file / Override File Type and choose back 'Java',  fixed the issue.


Please sign in to leave a comment.