In the previous article, I have explained about – What is Java?
In this article, I will practically explain the step by step installation and configuration of Java.
Note: I feel Java 8 is the best version to start learning. Hence, I will install and use Java version 8 mainly in this ‘Java for Testers’ Tutorial and will only upgrade if required.
Let’s get started.
Java for Testers – Install and configure Java
Follow the below steps for installing and configuring Java:
1) Google Search for ‘Java 8 download’ and click on the below link displayed in the search results:
2) In the displayed page, scroll down a bit and select ‘Accept License Agreement’ option as shown below:
3) Click on the Windows x64 (i.e. 64 bit) version of Java jdk link to download as shown below:
Note: 64 bit Java works only one 64 bit machines.
4) You will be taken to the Oracle Login page and will be asked to login as shown below:
5) If you already have Oracle account credentials, log in to the account.
If you don’t have Oracle account credentials, create an account and login.
As I already have the Oracle account credentials, I am directly logging in.
6) On providing the credentials and clicking on ‘Sign in’ button, observe that the download has started as shown below:
7) Double click on the downloaded Java jdk exe file to install as shown below:
8) Click on ‘Next’ buttons on the displayed wizards as shown below:
9) As Java has now successfully downloaded and installed, we have to configure it in your machine by following the below steps.
10) Go to your C drive and click on the Program Files folder as shown below:
11) Inside the Program Files, click on the ‘Java’ folder to go inside it as shown below:
12) Inside the Java folder, click on ‘jdk’ folder to go inside it as shown below:
13) Copy the path of the jdk folder as shown below:
14) Right-click on the ‘This PC’ option and select the ‘Properties’ option as shown below:
15) Click on ‘Advanced System Settings’ first.
In the displayed ‘System Properties’, click on ‘Advanced’ tab.
In the ‘Advanced’ tab, click on ‘Environment Variables’ button.
In the displayed ‘Environment Variables’ dialog, click on ‘New’ button under the ‘System Variables’ section as shown below:
16) In the displayed ‘New System Variable’ dialog, enter ‘JAVA_HOME’ into the Variable name field, paste the path copied in the above Step 13 into the Variable value field and click on ‘OK’ button as shown below:
17) Observe that the ‘JAVA_HOME’ System variable got added as shown below:
18) Now let’s add the Java bin folder path to the ‘path’ system variable by following the below steps.
19) Open ‘bin’ folder inside the ‘jdk’ folder (See Step13) as shown below:
20) Copy the ‘bin’ folder path as shown below:
21) Select ‘path’ system variable and click on ‘Edit’ button as shown below:
22) In the displayed ‘Edit Environment Variable’ dialog, click on ‘New’ button, Paste the path copied in the above step 20 and click on the ‘OK’ button as shown below:
Also, click on the other ‘OK’ buttons to close all the dialogs which are open as part of the above steps.
23) Now let’s check whether the Java has been successfully installed and configured in our machine by following the below steps.
24) Open command prompt in your machine and type the below command:
Observe that the version of the installed Java will be displayed as shown below:
If the version of the installed Java is displayed, as shown above, it confirms that Java has been successfully installed and configured in our machine.
Here conclude this installation and configuration of Java.
In the next article, I will explain installing the Eclipse IDE editor, which makes our Java program writing and execution easier.
- > To learn more about Java, continue to the next post (Click on Next Post link below)
- > Check complete Java Tutorial Contents here (Click here)
Please leave your questions/comments/feedback below:
Happy Learning 🙂
Arun Motoori (www.QAFox.com)
On a mission to help the Testing Community in all possible ways.