IntelliJ IDEA 2020.2 Help

Getting started with Groovy/Java 9+ project

In this tutorial, we'll create a Groovy project with JDK 14, will add simple code and run Groovy application.

Step 1. Create a project

Let's create a Groovy project with Java.

Create a new Groovy project

  1. On the welcome screen, click New Project.

  2. To the options on the right, IntelliJ IDEA automatically adds a project SDK (JDK). In our tutorial we use the open JDK 14 version.

    The Groovy library should be downloaded on your machine. IntelliJ IDEA expects the standard Groovy SDK layout which is provided with the official distributions available at http://groovy-lang.org/download.html. Download the SDK, unpack it into any directory and specify this directory as the library home. In our case, it is Groovy 2.5.6.

    Click Next.

  3. On the next page of the wizard, let's specify the name (GroovyDemo) and location of our project.

    Click Finish.

Add code

Let's add the following code:

class Example { static void main(String[] args) { // Using a simple println statement to print output to the console println('Hello World'); } }

Create the Run configuration

Run the application

Last modified: 06 September 2020