Java – eclipse does not refresh project files in the package Explorer view

Today, I saw eclipse 3.5 for the first time in three months Strange behavior of

First, when I run a main function, it runs a previously compiled version Suppose I open the Java class and the existing main function with Ctrl F11 in the window Usually it rebuilds the class and runs a new version Today, even if there is a compilation error, it will run normally So I don't think this will recompile the class

Next, more strangely, if I deliberately make errors in the code, eclipse will turn these rows and columns red, and the Project Explorer will still not mark them as containing errors If there are no errors, they remain gray

First of all, I don't know how to solve this problem I tried to reopen the project, restart eclipse, and finally restart the operating system After the tenth attempt, after restarting, eclipse says that all project files are "synchronized with the file system" When I press "Refresh" – F5 project title name in Project Explorer, I will eventually mark all wrong files as containing errors, and run the main functions to give the required results

An hour of my work passed and another project happened again All the same No files are marked red, no matter what old version of the class is running, there are no compilation errors

And because eclipse doesn't point out that the files are out of sync, just press F5 to operate the project

What can you suggest

Solution

When you select a project in the Project Explorer view and press F5, eclipse should traverse the entire directory tree so that the project can check that all files and directories are synchronized It does for me

The only thing I can think of that will cause this to not work is if you have a file system timestamp exception For example, if a file in the file system has been updated, but the file was last modified, it shows that the file has been updated in the past This can happen if your machine's system clock moves backwards or backwards at an inconvenient time If you think this is possible, try closing all projects, restarting eclipse, and performing another F5 refresh

(I encountered eclipse synchronization problems, but I put it in a combination of a flakey plug-in and a build from the command line. F5 or project > clean usually works for me)

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>