Search code examples
javaeclipsecompilationclasspathassets

Where would I find and how would I fix my .classpath file


I was trying to get my eclipse java project to compile with assets. I read that I needed to fiddle with the buildpath. I tried that, but I broke my program. It no longer compiles. I read another page that said I need to fix me .classpath file; however I cannot find that file.

How could I fix my project or find that file?

Also once I find it does anyone have any advice for what to do with it?

If more information is needed, I can provide it.

EDIT: Adding the src folder (which contains my code) is what gives me the error.


Solution

  • Each Java Project in the workspace has a .classpath file. Things like the Package Explorer do not normally show you this file because you can make most changes to it using the 'Java Build Path' page of the Project Properties.

    Note: On macOS and Linux files with names starting with '.' are considered hidden and are not normally shown.

    You can configure Package Explorer to show these files by clicking the View Menu (the small triangle at the top right of the view). Choose 'Filters...' and turn off the '.* resources' files.