Download the java and installation in windows

Download the java and installation process

You need to download the java before java installation. Java is essential component to configure and run selenium test scripts in eclipse. Below given steps will show you how to download the java and java installation process in windows 10.

Download the java

download the java
  • You will get windows x64 jdk executable file.
java download

Java installation in windows

  • Double click on .exe file to start installation of java. It will open java installation dialog.
  • Click on Next button.
start java installation
  • On next screen, It will ask to select installation directory. Keep it same as default and click Next button.
install java in windows
  • It will take just few seconds to complete installation.
  • On completion of installation, It will show screen with java successfully installation message and close button.
java installed successfully
  • Click on close button to close and complete installation.

Set JAVA_HOME system environment variable

Eclipse needs jdk to function. You must have to provide jdk and bin folder paths in system environment variable. Let me show you how to add JAVA_HOME and update Path environment variables.

  • Get path of jdk from java installation folder. It will be at C:\Program Files\Java\jdk-19.
set jdk path for java_home environment variable
  • Copy that path i.e. C:\Program Files\Java\jdk-19.
  • Search for System Environment Variables from windows start menu search area and select Edit the system environment variables from search result.
edit System Environment Variables
  • It will open System properties dialog. Select Advanced tab and click on Environment Variables button.
edit System Environment Variables
  • It will open Environment Variables dialog.
  • In system variables section, click on New button, Set Variable name = JAVA_HOME and paste jdk path(C:\Program Files\Java\jdk-19) in variable value field.
set java_home in system variables
  • It will add new system variable JAVA_HOME with jdk folder path.
Also you need to set bin folder path in Path system environment variable. Below given steps will update it.
  • Select Path variable from System variables section.
  • Click on Edit button to open Edit environment variable dialog.
  • Click on New button inside Edit environment variable dialog.
  • Set bin folder path %JAVA_HOME%\bin in new added blank line.
update path environment variable

  • Click on OK button from Edit environment variable dialog to save and close it.
  • Click on OK button from environment variable dialog to save and close it.
  • Click on OK button from System properties dialog to save and close it.
This way you can update JAVA_HOME and bin folder path in system environment variable.

Verify Java installed and configured properly

java installation and configuration can be verified with below given steps.
  • Open the command prompt. 
  • Type command java -version and press keyboard Enter button.
verify java installation

It will show java version message as shown in above image. That means java is installed properly in your system.

No comments:

Post a Comment