In order to compile Java language code into Java executable code, you need the Java Software Development Kit (or Java SDK). In the past, the Java Development Kit, or JDK was provided for free by Oracle, the company that controls Java. Since Oracle has stopped providing free development kits, we now get a free development kit from Amazon, who provides a free JDK.
You can watch this Java Install Tutorial video which demonstrates downloading and installing the Amazon Corretto Java Development Kit on a Windows 10 machine. Use this as a reference for other platforms as well, making the obvious platform specific changes.
You should download the Amazon Corretto 11 from this link. You should select the latest version (currently Amazon Corretto 11). Note that the JDK includes the Java Runtime Environment (JRE) that is compatible with the development environment. You will not need to download a separate JRE.
Once you have Java installed, there are several ways to run Java. The easiest is to open up a Command Window, and run java and javac commands from there. You will need an editor, and you can use your local editor, but I found it very easy to install and use Notepad++ (available at https://notepad-plus-plus.org) which includes Java syntax highlighting. You will also need to install git on your machine. I found that the easiest solution is to install git-bash (available at https://gitforwindows.org/), which enables you to use all of the Unix directory commands, as well as git commands and invocations of java and javac (as long as Amazon Corretto is installed) using the exact same syntax we use in lab.
At the start of the semester, we will be using Java without using an IDE, just to understand the basics. Eventually, we will download and start using the Eclipse IDE. When that time comes, there is a separate web page that describes the installation of Eclipse.