Skip to content

Task creating content with intellij

Developing new function with IntelliJ IDEA

Creating a new project

To add a new project to intellij, select New then Project from the File top-level menu of IntelliJ.

Step 1

Select Java then set up the project SDK by selecting your Java 11 installed JDK and then click the Next button. If this is the first time you are using IntelliJ you may need to click on the New... button and navigate to your install directory.

Step 2

Leave the Create project from template option blank and simply click the Next button.

Step 3

Add the name of the project in Project name and the directory where you want the project files to be stored in Project location.

Step 4

Click on the Finish button. If the directory is new, you may get this pop-up to confirm that the directory should be created. Click OK.

Step 5

Once the wizard completes IntelliJ will open up your new project, ready to begin coding. The src directory is where your code will go.

Step 6

Creating a new java package

To add a new Java package to your project, right-mouse click on the java directory.

Step 1

Select New then Package on the sub menu.

Step 2

A pop-up box appears asking for the name of the package. Enter your new package name and press the OK button. Java package names are in lowercase and are dot (.) separated.

Step 3

The new package appears under src in the project list.

Creating a new java class

To add a new Java class to your project, right-mouse click on the package name and select New then Java Class on the sub menu.

Step 1

A pop-up box appears asking for the name of the class. Enter your new class name and press the OK button.

Step 2

The new class appears in the project list and the source file is open in the editor.

Step 2

Adding changes to Git

Any changes, additions and deletions that you make to the files under the git repository directory are automatically detected by git. It is possible to add these changes to your clone using the Add option on the Git right-mouse menu.

Git->Add option