Live Reload
Download and unpack the latest version of , add the JDK to your IDE, and set your project / run configuration to use it. Alternatively set to its location.
In DCEVM 11.0.9 and later, HotswapAgent is disabled by default and needs the JVM parameter
-XX:HotswapAgent=fatjar
to work with Vaadin. Depending on your project technology stack, you may also want to apply additional configuration.Using your IDE’s debug command, start the Vaadin application in development mode.
To hot swap code when the JVM is not in debug mode, you can add the line to
hotswap-agent.properties
(in Spring Boot projects), or add the JVM parameter-javaagent:*<JAVA_HOME>*/lib/hotswap-agent.jar=autoHotswap=true
, whereJAVA_HOME
is the Java home of the TravaOpenJDK installation. Explicitly enabling automatic hotswapping may also be required with some older IDEs (such as NetBeans).When using the Jetty Maven plugin together with HotswapAgent, ensure automatic restart is disabled (omit or set
<scanIntervalSeconds>
to a value of0
or less).IntelliJ IDEA: avoid using the
Build project automatically
andcompiler.automake.allow.when.app.running
options simultaneously, since this may trigger automatic reload before classes are hotswapped properly.
Since the server does not restart, modifications to startup listeners and code that connects frontend and backend components, such as adding a new
LitTemplate
class, are not reflected. Modifications to routes are, however, picked up.With , view instances are reused when reloaded in the browser; hence, hotpatched changes to the view constructor will not be reflected until the view is opened in another browser window or tab.