How to Configure Java 1.8 On Windows

In this post I am going to explain how to install Java 1.8 on your machine and verify the same.

Here’s the steps:-

Install Java 1.8

You can install Java1.8 from Oracle website.Here’s the link:-

https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

You will see there are two executable files for windows, one for 64 bit and another for 86 bit.Check you System specification by going to Control Panel -> System and Security ->System.

You need to download the executable file and run it on your local machine.By default the java package will be installed under C -> Program Files->Java. But you can change the path as per your specifications.

After your java package is installed you will get the following screen:-

Set Environment Variables

You need the specify the path to the java folder using the PATH variable under Environment variables of your machine. You can access the environment variables of your machine by right click on My Computer or This PC ->Properties

Set the Variables

User Variables:- 

JAVA_HOME :- C:\Program Files\Java\jdk1.8.0_221

CLASS_PATH:- %JAVA_HOME%\lib;%JAVA_HOME%\jre\lib

Environment Variable

Add the following in the path variable:- 

PATH:- your-unique-entries;%JAVA_HOME%\bin

Verify Java Installation

Check if Java is correctly installed on your machine.Go to command prompt/terminal and type the following command:-
java -version

Troubleshooting

If in the command prompt its shows that the java is not recognized as a command, revisit the variable and their paths.You will get this error when the user variable and environment variable paths do not point to the correct location of java folder.

Another reason might be that the Java package is not installed properly ,check your bin folder and jre folder.If required reinstall the java package and following the above steps again


Published by Anna

Just a simple girl who loves to code. .I am primarily a Java developer by profession and I am here to share my love for coding with you all I hope you enjoy reading my blog. Happy Coding Guys :-)

Leave a comment

Your email address will not be published. Required fields are marked *