Docs

Documentation versions (currently viewingVaadin 24)

Run an Application

How to run a project in NetBeans.

This page describes how to run a project with NetBeans.

Run Maven Goals

NetBeans integrates with Maven, enabling you to run Maven commands. Besides building and cleaning the project, you can run the web application on an embedded web server.

Select the project in the Projects view. NetBeans shows common Maven goals inside the Navigator view:

The Navigator view in Netbeans IDE
Navigator View

Double-click a goal to execute it.

Run the Web Application

You can run the web application in an embedded web server by running the appropriate goal for your technology stack.

Technology Stack Embedded Server Goal to Run

Spring Boot

spring-boot:run

CDI / Java EE

Apache TomEE

tomee:run

Plain Java

Jetty

jetty:run

While the server is running, when you edit and save any source files, the server notices the change and redeploys the web application. Live Reload should be enabled by default, making the page refresh automatically.

To stop the server, click the "stop" button (red stop sign) in the Output view:

The Output view in Netbeans
Output View

Bind Maven Goals to IDE Actions

As running the web application is a frequent task during development, you may want to bind such a Maven goal to an IDE action.

To associate the Run project action with a Maven goal to start the server, proceed as follows:

  • Right-click the project in the Projects view and select Properties.

  • In the Project Properties window, select Categories  Actions.

  • Select the Actions  Run project option.

  • Type the goal to start the web server in Execute Goals: jetty:run (plain Java project), tomee:run (CDI project), or spring-boot:run (Spring Boot project).

  • Click OK:

    Actions

You can now deploy and run the web application by clicking the "run" icon (green play triangle) in the toolbar:

Toolbar

You can repeat the process to bind the same Maven goal to the Debug project IDE action, as well.

If the Vaadin application was created with Vaadin Start or a Maven archetype, you should be able to access it at localhost:8080.

With the above configuration, you can now use NetBeans to develop your Vaadin application with Maven.

To learn more about:

9E46A6C2-30AC-4252-810A-B95BB6D177F2