JDK stands for java development kit. Install any version that is 1.7 or higher.It is advisable to have JDK and NOT JRE. So lets pay close attention and ensure that our environment is pointing to JDK (which includes JRE)
Download JDK7 from oracle website downloads page. I am using JDK7, however if you have version 8 , that is fine too.
Accept license agreement
Select the java version according to your operating system environment. In my case it is 64 bit windows. Download and save it. Double click and run the setup.
Follow the regular process of installation of any software on windows and go with defaults. In my case, it got installed to program files\jdk as below
Now go ahead and create a environment variable JDK_HOME and point it to the installation directory. After that add %JDK_HOME%/bin to PATH variable
Now open a command line and type “java -version”, it should show the version installed.
It is important to have JDK and another way to check would be to navigate to your program files directory and open the folder and see that there is another “jre” folder inside the folder. We are emphasizing JDK because Maven would require JDK
Next step would be installing Maven