上QQ阅读APP看书,第一时间看更新
How to do it...
To download JDK 1.8, perform the following steps:
- Visit the preceding Oracle's page for downloads.
- On that page, click the JDK Download link. After the click, you will see the content page for JDK 1.8 installers as shown in the following image:
- Select Accept License Agreement by clicking its radio button.
- Start downloading the JDK depending on the operating system and architecture of your development machine. In the case of this book, we will be choosing the option jdk-8u112-windows-x64 since the operating system used by this book will be 64-bit.
- After saving the installer into the filesystem, run the installer and proceed with a series of installation wizards for JDK configuration with the inclusion of some JRE installation to your system.
- This is optional but it is recommended you create an environment variable JAVA_HOME for your newly installed JDK 1.8.112. On Windows operating systems:
- Open the System section of the Control Panel.
- Select the Advanced System Settings link. Windows 10 will prompt you with a User Account Control dialog box if you are not an administrator.
- Create a system variable JAVA_HOME and assign the location of the JDK directory to it.
- Look for the path system variable and append the following line: %JAVA_HOME\%bin.
- Verify if all classpath settings are created correctly. On Windows, open a new command terminal and run the javac -version command. This command must be recognized as a valid command; otherwise, check your configuration details again.