The Practice and Philosophy of Object-Oriented Programming in Java
How to Set Up Java and IntelliJ IDEA
Step 1: Download and install software
When you install the JDK, you will be prompted to create the home directory in a default
location on your hard drive or to select another location — either way, make note of the
location so that you can refer to it later. The following image shows the Windows installer
saving the JDK to
Using an older version of the JDK
Java 8, released in 2014, includes all of the language and library features used in this book, so it is not technically necessary to have the most recent release. However, Oracle recommends uninstalling any versions prior to Java 11 for security reasons, noting also that the latest version will offer the newest feature updates, bug fixes, and performance improvements.
Step 2: Configure IntelliJ for Java development
After installing IntelliJ IDEA, you will need to configure it for Java development by specifying the location of the JDK home directory. To do this, start the IDE, click on the configure gear at the bottom of the welcome screen, and select Structure for New Projects:
The following dialog will appear:
+ icon to add a new JDK:
Enter or select the JDK home directory. In the example shown below, there are two versions available (13 and 14.0.1) and the latter is selected:
After selecting the JDK home directory, a list of class paths will automatically appear in
OK button. Your IDE is now configured with the JDK.