DCEVM11 enables rapid turnaround by allowing almost any class change to the running VM through Hot Swapping which saves redeployment time. Hot Swapping allows developer to add or update existing code and test it without restarting the system. With DCEVM11, developer can instantly see the impact of code change. As DECVM11 is freely available so it can be used in place of JRebel which is another licensed Hot Swap Agent. However, if someone is ready to spend few dollars($), can refer https://www.jrebel.com/ and buy.
Steps to configure DCEVM11 is given below.
- Download and extract java11-openjdk-dcevm-windows.zip
- Set JAVA_HOME=D:\java11-openjdk\dcevm-11.0.10+3 (Adjust the path as per location in your system)
- In eclipse go to windows->Preference->Installed JRE and set JRE home to D:\java11-openjdk\dcevm-11.0.10+3
- In local.properties adjust the property tomcat.debugjavaoptions as below
tomcat.debugjavaoptions=-XX:HotswapAgent=core-javaagent:D:/java11-openjdk/dcevm-11.0.10+3/lib/hotswap/hotswap-agent.jar=disablePlugin=Log4j2,disablePlugin=Spring,disablePlugin=Proxy,disablePlugin=AnonymousClassPatch,disablePlugin=ZK,autoHotswap=true -Djava.locale.providers=COMPAT,CLDR -Xdebug-Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n -Xmx4G -Xms2G - Also, please set ANT_HOME environemnt variable so that we don’t need to run setantenv.bat from \hybris\bin\platform and update the PATH variable accordingly.
- Add System.out.println() statement in your code and then execute ant build command from that specific extension folder.
- Verify if HOT swap is done.