Docs

Documentation versions (currently viewingVaadin 25)
Documentation translations (currently viewingEnglish)

Run a Project

Run your Vaadin application with hotswap and live reload from within your favorite IDE.

You can run a Vaadin application from the command line with ./mvnw spring-boot:run (mvnw spring-boot:run on Windows), but during development you should run it from your IDE with hotswap enabled. The quick guides for common Java IDEs are here:

Tip
IntelliJ IDEA Ultimate gives the best developer experience.

There’s also another option: the Dev Loop CLI runs your application under a daemon that owns the edit-to-running-app loop, and gives you a single command that makes your edits live and reports whether they are. It’s especially useful when an AI coding agent is doing the editing; the Dev Loop Tutorial shows that end to end.

To increase your productivity, you should run your application with hotswap. By doing this, your changes are applied automatically without having to manually restart the application and reload the browser. The guides use the following terms:

  • Live reload applies your changes to the running application and refreshes the browser. For Java changes, it relies on either hotswap or an automatic restart of the application.

  • Hotswap replaces changed Java classes in the running application without restarting it. It’s faster than a restart, and the user session is preserved.

  • Hot deploy is a development mode for the frontend files in src/main/frontend. It’s useful when you actively develop client-side code, such as React views or your own web components.

Hotswap, live reload, and hot deploy are only used during development. They are disabled in production builds.

Tip
Are you behind a proxy?
Vaadin uses Node.js to download the frontend toolchain during the build. If you are behind a proxy, you may need to configure Node to use that. See the Flow Reference guide for details.

Frontend Changes

Changes to stylesheets in the src/main/resources/META-INF/resources directory are applied to the browser automatically. Adding or removing other files in this directory triggers a browser reload.

When hot deploy mode is enabled, all JavaScript, TypeScript, and CSS files inside the src/main/frontend directory are monitored by the frontend build tool. Adding, modifying, or removing a file in this directory triggers a rebuild of the frontend resources, and a browser reload. Without hot deploy mode, Vaadin uses a pre-compiled frontend bundle, and changes to these files trigger a rebuild of the bundle. See Hot Deploy & Live Reload and Development Mode for details.

Java Changes

When live reload is enabled, changes to your Java source files are automatically applied once they have been compiled by your IDE. This can happen either through an automatic restart of the server application, or by hotswapping the changed classes.

Not all changes to a Vaadin application can be hotswapped. For instance, if a changed class modifies some global state at application startup, you’d have to restart the application to see that change. There may also be cases where your application starts to behave strangely after having a class hotswapped. In this case, restarting the application manually is often enough to fix the problem.

The IDE guides above set up hotswap with HotswapAgent. For the other options — Spring Boot Developer Tools, which restarts the application instead, and the commercial JRebel — see Hot Deploy & Live Reload.