Documentation

Documentation versions (currently viewingVaadin 23)

You are viewing documentation for Vaadin 23. View latest documentation

Live Reload

JRebel is a commercial developer productivity tool for automatic, real-time update of Java code in the running application. Vaadin detects the JRebel Agent and automatically reloads the application in the browser after the Java changes have been hotpatched.

Step-by-Step Guide

  1. Set up and activate JRebel in your IDE by following the Quick Start guides available at https://www.jrebel.com/products/jrebel/learn. Use at least the 2020.2.1 version, which contains built-in live reload integration.

  2. Run or debug your Vaadin application using the JRebel Agent.

  3. Navigate to your Vaadin application on the browser, make and save some changes, and the browser reloads automatically.

Additional Configuration

  • When using the Jetty Maven plugin together with JRebel, ensure that automatic restart is disabled (omit or set <scanIntervalSeconds> to a value of 0 or less).

Current Limitations

  • Since the server doesn’t restart, modifications to startup listeners and code that connects front-end and back-end components, such as adding a new LitTemplate class, aren’t reflected. However, modifications to routes are picked up.

  • With @PreserveOnRefresh, view instances are reused when reloaded in the browser; hence, hotpatched changes to the view constructor aren’t reflected until the view is opened in another browser window or tab.

A76EF15A-322B-471B-B803-169F4E7920B1