In the process of using Eclipse to do Web debugging, we usually just need to modify the program in Eclipse, then we can find the file change in the browser refresh, and today we suddenly find that it can't be changed after saving.
1. Check that the files found in Tomcat are not updated.
2. Check the project-> Build automatically found in eclipse has ticked.
3. Check other settings in Eclipse and never find a problem
4. The clean discovery through project, can be updated.
What is the problem? Various irritability.
Asked a colleague, he said a reason that the Eclipse update mechanism is through the file modification time to judge, if the change time is later than the current time, then update, if the time ahead, then the file is not updated.
To check again
1. View the files under Eclipse, the time and the system time are consistent, the change time changes.
2, check the files under Tomcat, found that more than the system time ahead, modified did not send changes.
Why is that? Not clear, Baidu a bit, find two ways to modify the Tomcat JVM.
By adding the JDK in the Eclipse, server-
-xms128m
-xmx512m
-dfile.encoding=utf8
-duser.timezone=gmt+08
Once saved, modify again to find that the modification time has changed.
Summary: Recall that eclipse has been no problem before, how can today suddenly have a problem? Originally installed jdk1.7 Yesterday, the default JDK version is 1.6, it is possible that the JDK version has changed, causing the time zone in the JVM to be different, after each modification will be based on another time zone (observed a bit earlier than the original time of one hours, guess should be Japan time) generated modification time. If a colleague does not have this hint, looking for a few days I am afraid I can not find any problem, it seems to understand how the system works to more convenient troubleshooting.
Solve the problem of MyEclipse and Tomcat being out of sync