The most common way to find/navigate a Java source file in Eclipse IDE is to use the “Open Type” (Ctrl+Shift+T) or “Open Resource” (Ctrl+Shift+R) dialog. However by default when searching for the “.java” source file, Eclipse IDE will display the compiled class files in the search results as well, i.e. the “.class” files as well as the “.java” file. This can get annoying and makes finding the right Java source file difficult.
To change this behaviour and hide the “.class” files you need to do the following.
- Find your class output folder in the “Project explorer” window. This is usually called “bin” or “target” for Maven projects
- Right-click this folder and click “Properties”
- Tick the “Derived” checkbox and click “OK”
“.class” files will now be hidden in future.