In order to be able to compile Java code, we need the Java Development Kit (JDK) package that comes with a Java compiler. There are a number of different Java packages available, for this tutorial we will be installing Java Standard Edition (SE) on Windows. Java can be obtained from the Oracle Java download page.
Check following guides if you are looking to download and install JDK 1.5, JDK 1.6, JDK 1.7, JDK 1.8 or JDK 1.9.