Solve the problem of MyEclipse and Tomcat being out of sync

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.