Tracking file changes in Java

advertisements

I have java application. Every time when I'm doing changes in JSP file I need to copy saved JSP to another place (specific project). May be you know tool that can track changes in real time in files in specific folder and after every saving - copy these files to another folder, thanks.


Eclipse, IntelliJIdea like IDEs have a feature called Local History. you can view, compare replace each saved version through that by few clicks.

In java there is a support for watching file changes. You can use this to implement your own program that listen to file changes and save the version automatically whereever you want.

http://docs.oracle.com/javase/tutorial/essential/io/notification.html