NetBeans IDE installation and setup

NetBeans IDE is free and open source, and has a big community of users. You can download the NetBeans IDE from https://netbeans.org/downloads/, its official website.

At the time of writing this book, version 8.0.2 was the latest available version. As shown in the following screenshot, please download all the supported NetBeans bundles, as we'll use Javascript also:

NetBeans IDE installation and setup

NetBeans bundles

After downloading the the installation, execute the installer file. Accept the license agreement as shown in the following screenshot, and follow the rest of the steps to install the NetBeans IDE. Glassfish Server and Apache Tomcat are optional.

Note

JDK 7 or a later version is required for installing and running the All NetBeans Bundles. You can download a standalone JDK 8 from http://www.oracle.com/technetwork/java/javase/downloads/index.html.

NetBeans IDE installation and setup

NetBeans Bundles

Once NetBeans the IDE is installed, start the NetBeans IDE. NetBeans IDE should look as follows:

NetBeans IDE installation and setup

NetBeans start page

Maven and Gradle are both Java build tools. They add dependent libraries to your project, compile your code, set properties, build archives, or do many more related activities. Spring Boot or the Spring Cloud support both Maven and Gradle build tools. However, in this book we'll use the Maven build tool. Please feel free to use Gradle if you prefer.

Maven is already available in NetBeans IDE. Now, we can start a new Maven project to build our first REST app.

Steps for creating a new empty Maven project:

  1. Click on New Project (Ctrl + Shift + N) under the File menu. It will open the new project wizard.
  2. Select Maven in the Categories list. Then, select Java Application in the Projects list (as shown in following screenshot). Then, click on the Next button:
    NetBeans IDE installation and setup

    New Project Wizard

  3. Now, enter the the project name as restsample. Also, enter the other properties as shown in the following screenshot. Click on Finish once all the mandatory fields are entered:
    NetBeans IDE installation and setup

    NetBeans Maven project properties

    Tip

    Aggelos Karalias has developed a helpful plugin for NetBeans IDE offering autocomplete support for Spring Boot configuration properties available at https://github.com/keevosh/nb-springboot-configuration-support. You can download it from his project page at http://keevosh.github.io/nb-springboot-configuration-support/.

    You could also use Spring Tool Suite IDE (https://spring.io/tools) from Pivotal instead of NetBeans IDE. It's a customized all-in-one Eclipse-based distribution that makes application development easy.

After finishing all the the preceding steps, NetBeans will display a newly created Maven project. You will use this project for creating the sample rest application using Spring Boot.

To use Java 8 as a source, set the Source/Binary Format to 1.8 as shown in the following screenshot:

NetBeans IDE installation and setup

NetBeans Maven project properties

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset