Skip to main content

JAVA_HOME

Once you are done with JAVA JDK on your machine you need to set the JAVA_HOME also when you want to execute the Automation test you need to set the environment variable for JAVA_HOME.

Install the OpenJDK Software and Set JAVA_HOME on a Windows System

To install the OpenJDK software, do the following

The OpenJDK software is installed on your computer in the default location; for example, at C:\Program Files\Java\jdk-17. You can move the OpenJDK software to another location.

To set JAVA_HOME, do the following

  • Right click Start menu and select System.
  • On the Advanced system settings, select Environment Variables, and then edit JAVA_HOME to point to where the JDK software is located, for example, C:\Program Files\Java\jdk-17.

Install the JDK Software and Set JAVA_HOME on a Windows System

To install the JDK software, do the following

The JDK software is installed on your computer in the default location; for example, at C:\Program Files\Java\jdk1.6.0_02. You can move the JDK software to another location.

To set JAVA_HOME, do the following

  • Right click Start menu and select System.
  • On the Advanced system settings, select Environment Variables, and then edit JAVA_HOME to point to where the JDK software is located, for example, C:\Program Files\Java\jdk1.6.0_02.

Check JDK Version

  • Open Command Prompt
  • Enter java --version