Why won't Eclipse detect these files as part of my folder?

I have a bunch of class files for a Java project, but it does not detect them as part of the folder.

Finder: http://i.imgur.com/u1sMJ.png

Eclipse: http://i.imgur.com/EOXwG.png

It is annoying that I cannot access them.

+4
source share
3 answers

Right-click the project and click Refresh. That should decide. You can also go to the settings and enable "Update by own hooks or poll" and "update access" in the section "General"> "Workspace"

+6
source

If you copy files to a project folder using Finder (or Windows Explorer), by default you need to update Eclipse to synchronize it with the underlying file system. In addition, you can avoid copying files to a project outside of Eclipse and instead use Eclipse Navigator (similar to Finder) or Package Explorer views - you can drag and drop from the file system and, for example, drag it to the Navigator view.

In Eclipse> Preferences> General> Workspace, there are several Refresh options that can help automatically synchronize things.

+1
source

Never try to do something on the file system if you want to change something in Eclipse. Eclipse has its own view of the world, which is the so-called workspace. And only this workspace matters.

Therefore, please just create a new Java project in Eclipse, and then use File -> Import -> General -> File System to import existing Java files into the source folder of your Java project.

0
source

Source: https://habr.com/ru/post/1438303/


All Articles