Single logo
  • Courses
  • Blog
  • About
Join on SkoolJoin on Skool

In this topic

Java
  • Install Java 25 (JDK) and IntelliJ IDEA, Then Run Your First Program
  • Use Claude Agent, Copilot or Junie Inside IntelliJ IDEA
  • Java Hello World with Maven: What the JDK Does and What Maven Adds
  • Java Variables, Keywords and Naming Rules
  • Maven in IntelliJ: pom.xml, Dependencies and the Build Lifecycle
  • Java Primitive Types and Memory: What int x = 5 Really Does
  • Java Strings and Text Blocks: Quotes, Concatenation and parseInt
  • Java Operators: Arithmetic, a++ vs ++a, Precedence, && || and the Ternary
  • Java Type Casting: Widening, Narrowing and Converting Text to Numbers
  • Java Practice Lab: A Cafe Bill with Variables, Operators and Casting
  • Java if, else and switch: Braces, Else-If Ladders and the Modern Switch
  • Java Loops: for, while, do-while and for-each
  • Java break, continue and Nested Loops
  • What's New in Java 21 to 25: Compact Source Files and Sequenced Collections
  • Java Arrays: Indexes, Default Values, Loops and 2D Grids
  • Java Methods and Overloading: Parameters, return and Pass-by-Value
  • Java Scope, Code Blocks and the Call Stack
  • Read User Input in Java with Scanner (and the Leftover Enter Trap)
  • Java Practice Lab: A Gym Weekly Tracker with Loops, Arrays and Methods
  • Debugging Java in IntelliJ: Stack Traces, Breakpoints and a Better AI Prompt
  • Java var: Let Java Infer the Type
  • Push and Pull in IntelliJ: Two Developers, One GitHub Repository, a Rejected Push and a Conflict
  • Java Classes and Objects: One Blueprint, Many Cars
  • Java Constructors and the this Keyword
  • Java Instance Methods, Getters, Setters and toString
  • Java static: Fields, Methods and Blocks Shared by the Whole Class
  • Java Packages and Imports: Every Class Has an Address
  • Java Access Modifiers and Encapsulation: Private Data, Public Methods
  • Java final and Immutable Objects: Assign Once, Share Safely
  • Java Strings as Objects: The String Pool, == vs equals, StringBuilder and printf
  • Java Practice Lab: A Library Book Catalogue with final Fields and StringBuilder
  • Java Inheritance: extends, super and the Order Objects Are Built
  • Java Method Overriding, @Override and the Object Class
  • Java Polymorphism: Upcasting, Dynamic Dispatch and Downcasting
  • Java Composition: Has-A vs Is-A
  • Java Abstract Classes: A Parent That Leaves One Blank
  • Java Interfaces: Contracts and Multiple Inheritance
  • Java Nested, Inner and Anonymous Classes
  • Java Enums with Fields, Methods and switch
  • Java Practice Lab: Payment Processing with an Interface, an Abstract Class and an Enum
  • Java Records: A Whole Data Class in One Line
  • Java Sealed Classes and Interfaces
  • Java Pattern Matching with instanceof and switch
  • Java Record Patterns: Unpacking a Record
  • Java equals and hashCode: Why a HashSet Needs Both
  • From Arrays to Collections: The Java Collections Framework Map
  • Java Wrapper Classes and Autoboxing
  • Java ArrayList: The Stretchy Array
  • Java LinkedList vs ArrayList: Nodes or an Array
  • Java Sets: HashSet, LinkedHashSet and TreeSet
  • Java Sorting with Comparable and Comparator
  • Java Maps: HashMap, LinkedHashMap and TreeMap
  • Java Stacks, Queues and Deques: ArrayDeque and PriorityQueue
  • Choosing a Java Collection: Immutable and Sequenced Collections
  • Java Exception Handling: try, catch and finally
  • Java throw, throws, Checked vs Unchecked and Custom Exceptions
  • Java try-with-resources and Clean Error Handling
  • Java Generics: Type-Safe Containers
  • Java Generic Methods, Bounded Types and Wildcards
  • Java Lambdas and Functional Interfaces
  • Java Built-in Functional Interfaces: Predicate, Function, Consumer, Supplier
  • Java Optional: Saying Maybe Without null
  • Java Streams I: filter, map and reduce
  • Java Streams II: Collectors, groupingBy and flatMap
  • Why Concurrency: Processes, Threads and the Main Thread in Java
  • Creating Threads in Java: Thread, Runnable and Lambdas
  • Java Thread Lifecycle: sleep, join and interrupt
  • Java Race Conditions and synchronized
  • Java volatile and Atomic Variables
  • Java ExecutorService and Thread Pools
  • Java Callable, Future and CompletableFuture
  • Java Locks, Deadlock and tryLock
  • Java Concurrent Collections and Virtual Threads
  • Why Slow Work Belongs off the Request Thread: 202 Accepted and a Job Id in Spring Boot
  • Virtual Threads in Spring Boot: One Property, and the Connection Pool Trap
  • @Async, Named TaskExecutors and Structured Concurrency in Spring Boot
  • Java Files and Directories with NIO.2: Path and Files
  • Reading and Writing Text Files in Java
  • Java Structured Data: Reading and Writing JSON and CSV
  1. Blog
  2. /
  3. Java
  4. /
  5. Basics

Install Java 25 (JDK) and IntelliJ IDEA, Then Run Your First Program

Install JDK 25 (Microsoft Build of OpenJDK) with JAVA_HOME, install IntelliJ IDEA, then point a run configuration at the JDK and the main class and run Hello World.

Chaand Sheikh

·27 November 2026·Updated 28 November 2026Basics

What you will learn

  • Download and install the Microsoft Build of OpenJDK 25 with JAVA_HOME set
  • Install IntelliJ IDEA and open a lecture project folder
  • Fix 'Project JDK is not defined' with a run configuration
  • Run a Hello World class and read the exit code

Before you start

  • A Windows, macOS or Linux computer
  • No Java experience needed

You need two tools for every Java lesson: Java itself (the JDK) and an editor to write and run code in, IntelliJ IDEA. You install both once. After that, every lesson is just "open the project and run it".

Here's the plan:

  1. Install JDK 25, the Microsoft build.
  2. Install IntelliJ IDEA.
  3. Open a small Java project, tell IntelliJ which JDK to use, and run it.
Three steps: install JDK 25 with JAVA_HOME, install IntelliJ IDEA, then open a project and run it with a run configuration that names the JDK and the main class. Once Once Every project 1. JDK 25 Microsoft OpenJDK JAVA_HOME + PATH 2. IntelliJ IDEA write, open and run your code 3. Run configuration JDK + main class then the green Run Steps 1 and 2 happen one time. Step 3 is what you repeat for each project.
Install the two tools once, then each project only needs a run configuration.

Step 1: download JDK 25

JDK stands for Java Development Kit. It holds the compiler and the runtime that run your programs. We'll use the Microsoft Build of OpenJDK 25.

  1. Search for java download microsoft and open the Microsoft Learn result, "Download the Microsoft Build of OpenJDK".
  2. Check the address bar. You should be on learn.microsoft.com/java/openjdk/download, the official page.
  3. Scroll to the table for OpenJDK 25. Each operating system has its own row. On a normal 64-bit Windows machine, take the .exe file. On a Mac or Linux, pick your own row.

Step 1: install JDK 25

Run the downloaded file and go through the screens:

  • Install mode: choose "install for all users", the recommended option.
  • License: accept it and click Next.
  • Destination folder: keep the default. It goes inside Program Files\Microsoft, in a JDK 25 folder whose name starts with jdk-25 and includes the exact version. Remember this location; you'll need it in step 3.
  • Custom setup: this is the screen that matters. Tick the option that sets the JAVA_HOME environment variable, and keep the PATH option ticked.

JAVA_HOME is how your tools (IntelliJ, Maven and friends) find out where Java is installed. Click Next, then Install. It takes a minute or so. Click Finish and Java is on your machine.

Step 2: download and install IntelliJ IDEA

Search for intellij download and open the JetBrains result at jetbrains.com/idea/download. The page in the lecture showed version 2026.3. Pick the tab for your operating system and click Download. On Windows it's an .exe, and it's a big file, so give it a little time.

Run the installer:

  • On the installation options, tick a desktop shortcut, Add "Open Folder as Project" and the .java association. They are optional, but "Open Folder as Project" is handy for the lesson project files.
  • Keep JetBrains as the start menu folder and click Install.

Open IntelliJ from the desktop. The first start shows a splash screen for a few seconds, then the home screen. Under Projects there's an Open button, which is what you use next. The UI can look a little different in later versions, but the steps stay the same.

If you want the paid edition, you can get a free 6-month IntelliJ IDEA licence with the StudyEasy coupon.

Step 3: open a project and run it

On the home screen, click Open, pick the lecture's project folder and click Select Folder. The lecture uses a small Hello World project.

You may see a banner at the top of the editor: Project JDK is not defined. IntelliJ doesn't know which Java to use yet. You could fix it from the banner with "Setup SDK", but a run configuration does the job and it's how IntelliJ runs a program anyway.

Create the run configuration

  1. Open the drop-down at the top that says Current File and click Edit Configurations.
  2. Click + and pick Application. That's the type for a plain Java class with a main method.
  3. Three things need filling in: a name, the JDK and the main class. Right now the JDK box says "module not specified" and the main class is empty, which is why the form shows red.

Pick the JDK and the main class

  1. Open the JDK box and choose Select alternative JRE. Browse to C:\Program Files\Microsoft, pick the JDK 25 folder and click Select Folder.
  2. Name the configuration HelloWorld.
  3. In Main class, type the full class name, org.studyeasy.helloworld.HelloWorld. You can also click the small icon at the end of the field and pick the class from a list.
  4. Click OK. The toolbar now shows HelloWorld, your configuration. Click the green Run button next to it.

The Run window shows:

Hello World

Process finished with exit code 0

Exit code 0 means the program ended normally. Everything works.

Common mistakes

  • Skipping the JAVA_HOME option. Java still installs, but other tools can't find it. If that happens, re-run the installer and tick it.
  • Downloading from a random mirror. Check that the address is learn.microsoft.com for the JDK and jetbrains.com for IntelliJ.
  • Typing only the class name. The main class field needs the full name with the package: org.studyeasy.helloworld.HelloWorld, not HelloWorld.
  • Picking the wrong folder for the JDK. Select the JDK 25 folder itself, not Program Files\Microsoft above it.

Recap

StepWhat you doHow often
JDK 25Install the Microsoft Build of OpenJDK with JAVA_HOME and PATH tickedOnce
IntelliJ IDEAInstall from jetbrains.com, open the project folderOnce
Run configurationApplication type, the JDK 25 folder, the full main class namePer project
RunGreen Run button, look for exit code 0Every time

Next, you'll create a project from scratch and see what the JDK and Maven each do in Hello World with Maven and the JDK.

Keep going in Java · 1 of 79

Next post
Use Claude Agent, Copilot or Junie Inside IntelliJ IDEA
Community · Free to join
Single logo

StudyEasy AI Community

Hosted onSkool

Learn AI engineering, share what you build, and connect with other learners.

  • Free resources: lesson files, notebooks and code

  • Ask questions and join engineering discussions

  • Meet real people learning and building with AI

Join free on Skool

Related course on Udemy

FULL STACK JAVA : JAVA + JSP + SPRING BOOT AI + REACT + VIBE

Java 25, JSP, Hibernate, Spring Boot 4, REST APIs, React and Spring AI.View on Udemy ↗: FULL STACK JAVA : JAVA + JSP + SPRING BOOT AI + REACT + VIBE (paid course, opens in a new tab)

Related posts

Use Claude Agent, Copilot or Junie Inside IntelliJ IDEA

Open IntelliJ's AI Chat, pick Claude Agent (the agent behind Claude Code) or Copilot and a model, ask in plain words for Main.java to print the date and time, review the change, and run it.

Java Hello World with Maven: What the JDK Does and What Maven Adds

javac compiles HelloWorld.java into bytecode and java runs it on the JVM. Maven adds one pom.xml, the same folders in every project and one build command. Then a real Maven Hello World in IntelliJ.

Java Variables, Keywords and Naming Rules

A variable is a labelled jar that holds one value at a time. Four small programs show declaring, reassigning, the names Java accepts, the keywords it reserves, and why daysUntilLaunch beats d.

Maven in IntelliJ: pom.xml, Dependencies and the Build Lifecycle

Open a plain project and a Maven project in IntelliJ, read an invoice app's pom.xml, follow jackson-databind from Maven Central into ~/.m2, and see why each lifecycle phase runs the ones before it.

On this page

  • Step 1: download JDK 25
  • Step 1: install JDK 25
  • Step 2: download and install IntelliJ IDEA
  • Step 3: open a project and run it
  • Create the run configuration
  • Pick the JDK and the main class
  • Common mistakes
  • Recap
Community · Free to join
Single logo

StudyEasy AI Community

Hosted onSkool

Learn AI engineering, share what you build, and connect with other learners.

  • Free resources: lesson files, notebooks and code

  • Ask questions and join engineering discussions

  • Meet real people learning and building with AI

Join free on Skool

Related course on Udemy

FULL STACK JAVA : JAVA + JSP + SPRING BOOT AI + REACT + VIBE

Java 25, JSP, Hibernate, Spring Boot 4, REST APIs, React and Spring AI.View on Udemy ↗: FULL STACK JAVA : JAVA + JSP + SPRING BOOT AI + REACT + VIBE (paid course, opens in a new tab)

Single logo

Empowering Education, One Course at a Time

About
About usContact us
Legal
Terms of UsePrivacy Policy

© 2026 StudyEasy Organization. All rights reserved.