This tutorial could not be loaded.
Loading tutorial...
Interactive tutorial
Install the Java Development Kit, verify your Java tools, and write your first Java program using a plain-text editor and terminal. You will compile and run the program on your own computer, change its output, and troubleshoot common beginner errors. Installation paths cover Windows 11, macOS, and Ubuntu 24.04 LTS.
Step 1 of 9
2 min
Understand the Tools and the Goal
Learn the tools and conceptual workflow behind writing and running a first local Java program.
Step 2 of 9
9 min
Choose and Install JDK 21
Select and install the supported JDK 21 package for your operating system and processor architecture before verifying the Java tools.
Step 3 of 9
5 min
Verify Java in the Terminal
Verify that your terminal can locate both Java development tools and that they are using JDK 21.
Step 4 of 9
4 min
Create and Save the Source File
Create one local Java project folder and save the starter source file as plain text.
Step 5 of 9
3 min
Read Your First Java Program
Read the structure of `HelloJava.java`, distinguish required Java syntax from the editable message, and complete a valid first program.
Step 6 of 9
4 min
Compile and Run the Program
Compile your saved Java source file into bytecode, then run the resulting class from the terminal.
Step 7 of 9
3 min
Change the Output and Run Again
Add a second output line, rebuild the class file, and recognize why a saved source change is not visible until compilation succeeds.
Step 8 of 9
4 min
Fix Common Beginner Errors
Use workflow stages and diagnostic clues to correct common Java beginner errors without accidentally relying on an older class file.
Step 9 of 9
5 min
Complete Your First Java Workflow
Assemble the final two-line program, compile and run it locally, and explain how the source file, bytecode, compiler, and launcher work together.
Video Courses
recommended
recommended
Advanced
Advanced
Advanced
Ideal for beginners
Ideal for beginners
Thousands of online courses in video, ebooks and audiobooks.
To test your knowledge during online courses
Generated directly from your cell phone's photo gallery and sent to your email
Download our app via QR Code or the links below:.
+ 10 million
students
Free and Valid
Certificate
60 thousand free
exercises
4.8/5 rating in
app stores
Free courses in
video and ebooks