Download the JDK installer from the official Oracle or OpenJDK website
Choose the version that matches your operating system
Run the installer
Follow the installation prompts
Accept the license agreement
Select the installation location if needed
Complete the installation
Open a terminal or command prompt
Verify the installation with `java -version`
Verify the compiler with `javac -version`
Set the `JAVA_HOME` environment variable if required
Add the JDK `bin` folder to your system `PATH` if required
