Documentation versions (currently viewingVaadin 14)

You are viewing documentation for an older Vaadin version. View latest documentation

Automatic restart

There are several tools which can speed up the development process. Using JRebel, spring-boot-devtools or HotswapAgent allows you to see changes without application restart.


To try JRebel for free there is a 2 weeks trial. To start using it follow the instructions for your IDE: or

JRebel has integration with a lot of frameworks, in particular with spring-boot. It allows to substitute modified and recompiled classes into classpath without the application restart.

Spring-boot-devtools and Live Reload

To activate spring-boot-devtools is needed to:

Add spring-boot-devtools dependency


Fork the process used to run the application by changing spring-boot-maven-plugin configuration


Create and place into the src/main/resources/META-INF the following


This means we explicitly define that such jars are unmodifiable and they shouldn’t be reloaded on each application restart. More info at Customizing the restart classloader.

Optionally you might want to avoid the data generator to be run on each single reload, therefore, make H2 database store entities in file-system instead of in memory by adding the following lines to the src/main/resources/


To trigger the restart, it is needed to update classpath. In Eclipse it can be done automatically after saving modified file. In IntelliJ IDEA can be done manually Build → Build Project

Live reload is supported and browser extensions can be found at


To setup HotswapAgent follow the tutorial.

  • Start with downloading and installing alternative JVM. Don’t forget to run the installer with administrator privileges.

java -jar installer-name.jar
  • Download manually the HotswapAgent or install the IDE plugin (if you are using IntelliJ IDEA)

  • Create Run/Debug configuration which will run the HotswapAgent for IntellijIDEA or Eclipse.

For running the app through the HotswapAgent in a Debug session, add this line to the JVM parameters

-XXaltjvm=dcevm -javaagent:PATH_TO_AGENT/hotswap-agent.jar

But if you rather a Run session, you need to set autoHotswap flag in the parameters

-XXaltjvm=dcevm -javaagent:PATH_TO_AGENT/hotswap-agent.jar=autoHotswap=true
For IntelliJ IDEA there is a HotswapAgent plugin which works with debug session only. It doesn’t support the autoHotswap flag. It’s needed to setup Run/Debug configuration manually for running without debug session.

If you prefer to run application via command line, you just need to set the JVM parameters via the MAVEN_OPTS environment variable:

MAVEN_OPTS="-XXaltjvm=dcevm -javaagent:PATH_TO_AGENT/hotswap-agent.jar=autoHotswap=true" mvn spring-boot:ru