> Markdown version of [Using an IDE](https://vaadin.com/docs/v10/bakeryflow/using-an-ide). Section index: [llms.txt](https://vaadin.com/docs/v10/bakeryflow/llms.txt)

# Using an IDE

This tutorial shows how to build, run and debug the application in an IDE. For a tutorial on how to build and run the application from the command line see the [Running, building and packaging](https://vaadin.com/docs/v10/bakeryflow/running-building-packaging.md) page.

## <a id="importing-a-project"></a>Importing a project

Extract the project zip downloaded from <https://vaadin.com/start#vaadin10> and import it into your IDE

### <a id="import-to-eclipse"></a>Import to Eclipse:

1. `File → Import…​`

2. `Maven → Existing Maven Projects`, press Next

3. Select the path to the extracted archive folder and click finish.

### <a id="import-to-intellij-idea"></a>Import to IntelliJ IDEA:

1. `File → Open…​`

2. Select the path to the extracted archive folder

## <a id="building-and-running"></a>Building and Running

After the application is opened in an IDE and all dependencies are resolved there are several ways to run it.

### <a id="run-as-a-java-application"></a>Run as a Java Application

In Eclipse right click on the application folder in Package Explorer → Run As → Java Application. After that pick `Application.java` as the entry point class.

In IntelliJ IDEA right click on `Application.java` → Run 'Application.main()' or click on the green arrow at the `main` method line in the `Application.java`.

[Image: Idea Run Main]

> **Note:** There is a known issue with IntelliJ IDEA when a provided dependency is not in the classpath (<https://youtrack.jetbrains.com/issue/IDEA-107048>). So, if you are using an IDEA build older than 181.1818 then it is necessary to set the `compile` scope for the `spring-boot-starter-tomcat` dependency. Since `compile` is the default scope in maven, the dependency should be defined in `pom.xml` as:

```xml
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-tomcat</artifactId>
</dependency>
```

### <a id="run-as-a-maven-build"></a>Run as a Maven build

In Eclipse in Package Explorer right click on the application root folder or on the `pom.xml` file. Choose Run As → Maven Build…​ and specify `spring-boot:run` as the run goal. Give the configuration a name and click Run.

Once the Maven Run configuration is saved you can find it in `Run Configurations`

[Image: Eclipse Run Configuration]

In IDEA, choose Run → Edit Configurations…​ in the main menu. Then in the Run/Debug Configuration dialog box, click `+` on the toolbar and select `Maven` as the configuration type. Enter `spring-boot:run` as the command line and press Ok.

[Image: IDEA Edit Configuration]

[Image: IDEA Run]

Press the green arrow to launch the app.

More about how to create and edit run/debug configuration in IntelliJ IDEA: <https://www.jetbrains.com/help/idea/creating-and-editing-run-debug-configurations.html>

To make a production build use the `clean install -Dvaadin.productionMode` maven goal. After a production build is done in \`application-folder-path/target' you can find the .war file which is ready to be deployed to an application server.

## <a id="debugging"></a>Debugging

In Eclipse same configurations can be used but should be run from `Debug configurations`.

In IDEA pick the configuration needed and click `Debug Application` button.

## <a id="automatic-restart-and-live-reload"></a>Automatic Restart and Live Reload

See [Automatic restart](https://vaadin.com/docs/v10/bakeryflow/auto-restart.md)
