Install Java on your computer. Your computer must be a Windows, macOS, or Linux computer. Not a Chromebook. You may also need to reboot.
Open the terminal program on your computer. On macOS it is called "Terminal". On Windows it is called "Command Prompt". Run the java
command. Then run the javac
command. If you see a message like "command not found", then Java is not properly installed.
Click the Download Zip
button in the upper right hand corner of this page. Once the download is complete copy all the Java files to your Desktop.
Open your computer's terminal program and use the cd
command to change directory to your Desktop.
Windows
cd \Users\%username%\OneDrive\Desktop
or
cd \Users\%username%\Desktop
macOS and Linux
cd $HOME/Desktop
javac HelloWorld.java
java Main