Is there a way to automatically refresh the changes I made in my java classes once I ran my alfresco repository in eclipse ? Because it is very time consuming to stop my tomcat, make changes in my classes and re run it then test the changes I made.
Is there a way to configure it ?
Yes there is way, If you are using SDK 3.0 you need to configura hotswap agent.
Below link will help you in that.
https://docs.alfresco.com/community/tasks/sdk-hot-reload-hotswap.html
You can configure hotswap agent in eclipse also.same add same configuration in eclipse (Run Configuration->Maven Build->New Build)
In case of SDK 2.0 you need to use spring-loaded jar instead of hotswap agent.Configuration steps are almost same except the goals.