How to setup java on windows

This is a step-by-step guide to install java (JRE) on windows machine.

Step-1 Download Java

Download the appropriate JRE package from oracle, choose the package which suits your windows specifications (x86 for 32 bits) (x64 for 64 bits).

Windows Java

P.S: if you install x86 version on 64 bit environment, java may not consume the dedicated amount of memory, it happened to me one day, when i installed java x86 on 64 bit environment by mistake and i kept hours investigating why java is not consuming the 2 GB memory which i assign to it.

Step-2 Install Java

After downloading the .exe file, just install it using the default instructions.

When the installation completes, java should be installed at “C:\Program Files\Java”.

Step-3 Configure JAVA_HOME

The final step is to define the JAVA_HOME environment variable which is used by windows in order to run java applications.

Open the Advanced system settings and set the JAVA_HOME environment variable as the following:


That’s it.


0 0 votes
Article Rating

Hussein Terek

Owner of, I have a passion for software engineering and everything related to Java environment.

Inline Feedbacks
View all comments