Assignment 0 - kleinay/arieloop2026 GitHub Wiki
Assignment 0 – Setup and Working Environment
OOP 2026 · Ariel University
Goal:
The goal of this setup assignment is to ensure that you have a complete and working Java environment for the OOP course.
1. IntelliJ IDEA Setup
We will use IntelliJ IDEA Community Edition as our development environment.
- Download and install IntelliJ IDEA Community Edition from
https://www.jetbrains.com/idea/download - During installation, make sure to:
- Select Add “bin” folder to PATH (optional but useful)
- Associate
.javafiles with IntelliJ IDEA
Your computer must have JDK 21 or higher installed and configured in IntelliJ.
When creating a project, verify that IntelliJ detects and uses Java 21+.
How to check inside IntelliJ
-
When creating the project:
- In the New Project window, look for the field “JDK”.
- If it shows something like
jdk-21oropenjdk-21, you’re good. - If not, click “Add SDK → Download JDK” or “Add JDK” and select the folder where your JDK 21 is installed (e.g.,
C:\Program Files\Java\jdk-21).
-
After the project is created:
- Open the top menu: File → Project Structure → Project
- Under Project SDK, it should say
21(or higher). - Under Project language level, choose “21 – (Switch expressions, string templates, etc.)”
(If you’re not sure, pick the highest available level.)
-
Optional quick check:
- In IntelliJ’s Terminal (bottom panel), type:
You should see:java -version
confirming your environment is using JDK 21.openjdk version "21.0.x"
- In IntelliJ’s Terminal (bottom panel), type:
2. Create and Run Your First Java Project
- Open IntelliJ IDEA → click “New Project”
- Select Java, and make sure the JDK is version 21 or newer.
- Name your project
Assignment0_HelloWorld. - IntelliJ will create a structure like:
Assignment0_HelloWorld/ .idea/ src/ Assignment0_HelloWorld.iml - In the src/ folder, create a new Java file named
HelloWorld.java:
/**
* @author YourName
*/
public class HelloWorld {
/**
* A simple demo program to verify your setup.
*
* @param args command line arguments
*/
public static void main(String[] args) {
for (int i = 0; i < 5; i++) {
System.out.println("Hi");
}
}
}
- Click the green ▶ icon next to the
mainmethod or at the top of the editor to run the program.
The output should be:Hi Hi Hi Hi Hi
3. Understanding IntelliJ’s Build System
When you create a project, IntelliJ automatically manages your build and configuration files.
Here’s a short explanation of what’s going on behind the scenes:
.idea/folder – contains project-specific settings and configuration files.modules.xml– defines the modules in your project (e.g., source roots, output paths).workspace.xml– stores personal preferences such as window layout and run configurations.misc.xml– holds general project settings (e.g., JDK version, compiler options)..imlfile – defines each module’s source folders and dependencies.
You should not edit these files manually — IntelliJ manages them automatically.
They make sure IntelliJ knows how to build, compile, and run your project correctly.
4. Submission Checklist
✅ IntelliJ IDEA installed and working
✅ JDK 21 or higher configured
✅ “HelloWorld.java” runs successfully
Once all items above are verified, you’re ready to start the real assignments!