Using Intellij
Creating a Project
- Click create new project from the main window of Intellij
- Ensure project SDK is Java 1.8 or 1.11
- Ignore additional frameworks and libraries
- Click next
- Click next again to avoid using a template
- Name your project and choose the directory you would like the project to go in
Creating Classes in Your New Project
- Click on the Project button near the top left of the screen if it is not already expanded
- Right click on the blue src folder
- Choose new(at the very top) from the menu which appears and select “Java Class”
- Enter a name and press OK
Compiling and Running a Java Class
Intellij automatically compiles your classes for you before running them, so generally you will not need to compile any classes manually
You can also run the debugger by hitting the green bug to the right of the arrow at the top right of the window
Options
- Green arrow in top right corner
- Green arrow near main method
- Green arrow at class decleration
- Green arrow in run panel (only available after running the class at least once
- Control-R shortcut on Macs