Selenium Test Automation: How to download and install JDK (Java Development Kit) on Windows?

Selenium

BriefTitle: 
Set up Java

Download and install JDK on Windows

Environment:

Operating System: 64 bit Windows 8


In this tutorial, we will download, install, and set up Java following the steps:

Step 0: Un-Install Older Version(s) of JDK/JRE

Before you install the latest JDK/JRE, un-Installing the older version(s) of JDK/JRE is recommended. To un-install older JDK/JRE version(s):

  1. Click Start
  2. Select Control Panel
  3. Select Programs
  4. Click Programs and Features
  5. Select ALL programs begin with "Java" and then click the Uninstall button.

Step 1: Download JDK

  1. To install Java, you first need to download the installer program from Oracle’s website
  2. Under Java Platform, Standard Edition section, click the JDK Download link.
  3. selenium java 1

  4. You are then prompted to read and agree with the end user license agreement. Accept the terms of service and choose the correct operating system(Windows, Linux, Mac, etc.) for the specific JDK.
  5. selenium java 2

  6. Save the .exe file to your computer.
  7. selenium java 3

Step 2: Install JDK

Note: You must have administrative permissions in order to install the JDK on Microsoft Windows.
  1. After downloading JDK, navigate to the directory where you saved the .exe file. Double click on the file to begin installation of JDK.
    selenium java 4
  2. Click the Run button to run the installer.
    selenium java 5
  3. The installation process starts. Click the Next button to continue the installation.
    selenium java 6
  4. Keep the default options and then click the Next button.
    selenium java 7
  5. Keep the default directory where the source java files will be and then click the Next button.
    selenium java 8
  6. After installing the JDK, click the Close button. This will complete Java installation process.
    selenium java 9

Step 3: Verify JDK is installed

To check that you have the right version of JDK installed on your windows computer, follow the below steps:

  1. Open the command prompt one of the following ways:
    • Click Search > Enter cmd > Choose Command Prompt.
    • Right-click Start button > Click run > Enter cmd
  2. In the command prompt,type the command java -version in boldface below and then press Enter. You should see something similar to the information printed below.

    C:\Users\username>java -version
    java version "1.8.0_131"
    Java(TM) SE Runtime Environment (build 1.8.0_131-b01)
    Java HotSpot(TM) 64-Bit Server VM (build 25.144-bo1, mixed mode)

Sorting: 
0

Comments

Great post. Thanks.

Thank you

Add new comment

Selenium