Skip to Content
Technical Articles
Author's profile photo Madhu Bonakula

Hotswap code changes and save more than 40% of development time, JDK 11



Standard Java  Hotswap is limited to in-body code changes, But DCEVM + Hotswap agent allows you to Hotswap addition, removal and modification of following changes for Java classes.

  • class fields,
  • methods
  • anonymous classes
  • static members
  • Enums

What it will not support:

  • Addition or removal of Annotation change the super class  or interface. XML changes

 Benefits of DCEVM in Hybris.

  • Building the code,  starting the server takes average 12 to 20 mins, depending on no of extensions you have and speed of the system.
  • DCEVM saves all these build and deployment timing from these many minutes to seconds, if you have changes only in java files.
  • And when you are able to test your changes within a seconds, there is fair chance that you can spend good amount of time in unit testing, that means a less bugs and better code quality.

For any  XMl changes and New classes:

  • In case if you have to do changes in XML files and there is need to create a new class etc, then
  • I suggest  whenever you start your day for the work, create a design your solution identify all your new classes that needs to be created , create them with some empty body or minimal code and define them in the XML, then do the normal build and deployment.
  • Once you have all the required classes loaded, then you any modify them any number of times without do Hotswap without actually deployment them with normal process.



  1. download  DCEVM JDK
    • DCEVM Opend JDK 11 from:
    • Setup DCEVM JDK as JAVA_HOME and make sure you update the path too.
  2. add below property in

    tomcat.debugjavaoptions=-XX:HotswapAgent=core  -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=*:5500,suspend=n
  3. Start hybris in debug mode “hybriserver.bat debug“./ debug

  4. Do Remote debug from Intellij Idea or Eclipse with properties.



Debug config in IntelliJ Idea


5. Debug should be on,  then do  some code changes.


created a dummy test method getMessage3() in home page controller while debug is on.

6. Compile only that class , within seconds it will do that job


build modified classes , choose Build option in main menu.

7. Now this class gets recompiled and the changes gets loaded in the server, and  when you refresh the home page you should be able to see message from new method getMessage3() created newly in the console.


See the classe reloaded alert

In Summary:

  • To setup DCEVM, you just need to download  DCEVM JDK and set it as your JAVA_HOME
  • Add additional property in your
  • Start the server in Debug mode
  • Start Remote debug in your faveraout IDE
  • Recompile the modified classes to get them reloaded in the server  to save the time of  building and restarting the hybris server. Thats it.

Points to be Noted :

  • Setup is for JDK 11,
  • Tested for Hybris 2105, But should work any version which is based JDK 11.
  • We have to use DCEVM Open JDK instead of Standard JDK 11.
  • Eclipse or Intellij Idea.
  • For Setup  for JDK 8 , you can refer
  • you can try “ant build” command instead of recompiling from IDE

Thanks for your time, Comments and suggestions are welcome, If any one using docker, we can do this from docker too, I will share those details next time.


Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.