Task creating content with intellij
Developing new function with IntelliJ IDEA¶
Creating a new project¶
To add a new project to intellij, select
Project from the
File top-level menu of IntelliJ.
Java then set up the project SDK by selecting your Java 11 installed JDK and then click the
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.
Create project from template option blank and simply click the
Add the name of the project in
Project name and the directory where you want the project files to be stored in
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
Once the wizard completes IntelliJ will open up your new project, ready to begin coding. The
src directory is where your code will go.
Creating a new java package¶
To add a new Java package to your project, right-mouse click on the
Package on the sub menu.
A pop-up box appears asking for the name of the package. Enter your new package name and press the
Java package names are in lowercase and are dot (
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
Java Class on the sub menu.
A pop-up box appears asking for the name of the class. Enter your new class name and press the
The new class appears in the project list and the source file is open in the editor.
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.