Week 1

Environment setup

How Java works

Types and Variables

Arrays

Basic IO

Control Flow

Packages

OOP in Java

Static Members

Practice

Assignment

Back end Track

What is Java Development Kit (JDK)

The JDK is a software package you install on your machine. It contains the JRE, the JVM, and all the development tools.

Different JDK distributions comply with JDK specifications:

Implementation Provider Cost
OpenJDK Oracle/Community Free
Temurin Adoptium Free
Corretto Amazon Free
Oracle JDK Oracle Paid
Zulu Azul Free/Paid
GraalVM Oracle/Community Free/Paid

When you install the JDK, you get several command-line tools.

Tool Command What it does JS/Node Equivalent
Compiler javac Converts .java (source) to .class (bytecode). tsc (TypeScript Compiler)
Launcher java Starts the JVM and runs your compiled class. node index.js
Archiver jar Packages your code into a single .jar file. npm pack or Webpack/Rollup
Documentation javadoc Generates HTML documentation from your comments. JSDoc

Windows

Linux (Ubuntu/Debian)

macOS

Verify your installation

javac -version

<aside> ⚠️

If get an error similar to “javac cannot be found”, try to restart your terminal application

</aside>

For more information about installing OpenJDK you can check the official website : https://openjdk.org/install/

<aside> 💡

Many Java tools (like Maven, Gradle, or IntelliJ) look for an Environment Variable called JAVA_HOME. This is the path to the root folder of your JDK.

</aside>

<aside> 💡

In the Java world, the most popular tool for managing versions is SDKMAN!. It works on macOS, Linux, and Windows (via WSL). https://sdkman.io/

</aside>


The HackYourFuture curriculum is licensed under CC BY-NC-SA 4.0

CC BY-NC-SA 4.0 Icons

*https://hackyourfuture.net/*

Found a mistake or have a suggestion? Let us know in the feedback form.