| Install the Java Development Kit (JDK) | Prof. Bartenstein |
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 Azul who provides a free JDK package for several different platforms.
You can watch this Java Install Tutorial video which demonstrates downloading and installing the Azul Zulu Java Development Kit on a Windows 10 machine. Use this as a reference for other platforms as well, making the obvious platform specific changes.
The free Azul Zulu JDK packages are available at the Azul download link. 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.
On the Azul downloads page, select the Java Version specified in class (currently 16.0.2). The select the operating system and architecture of your computer. Click on the "How to Install" hyperlink for installation instructions. The Java Package field should be pre-selected to "JDK", and should not be changed.
If there are multiple versions to download, it's often easiest to choose the most automated version. For instance, for a Windows install, it's much easier to install the ".msi" package which installs in a valid default directory and updates your Path automatically, instead of installing the ".zip" package which makes you figure out where to install and how to update your Path.
There is a second free Java distribution produced by Amazon called "Amazon Corretto" which you may also install. Amazon doesn't update quite as frequently as Azul, but it's the same basic code.
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 can run "java --version" and "javac --version" to make sure you have the right version installed.
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.
Java is a language which is constantly evolving. Many new features are added to the langauge, and sometimes, old features are removed. If you have been using your machine for a while, especially if you browse the web, it is very likely that you have installed at least the Java Run-Time environment (JRE) in order to run Java applications, and the level of the JRE doesn't match the one we are using in class.
If you have done any Java development before class started on your machine, you probably have a Java Development Kit (JDK) already installed as well, and that may not be the same level as the one we are using in class.
All testing and grading will be performed with the level of JDK specified in the beginning of class. The professor will be providing code that assumes the level of JDK specified in the beginning of class as well. If you do not install the level of JDK specified in class, things will break! Even worse, things which worked on your version of JDK may not work on the class vesion of JDK, and you will get zero grades on homework, labs, and tests. In order to avoid this, you must install the version of the JDK specified in class.
It is perfectly valid to hanve multiple versions of the JDK installed on your computer. Sometimes (very rarely), older applications require an older version of Java, and therefore you need to keep the app running. However, I have found that it's best and easiest to uninstall older versions of the JDK before installing new versions to save disk space and to ensure you get all the features and fixes in the new packages.