1. How To Install JDK on Windows
Step 1(a): Un-Install Older Version(s) of JDK/JRE
I recommend that you install the latest JDK, but it can be messy if you have multiple versions of JDK/JRE.
If you have previously installed older version(s) of JDK/JRE, un-install ALL of them. Run “Control Panel” ⇒ Program and Features ⇒ Un-install programs begin with “Java”, such as “Java SE Development Kit” and “Java SE Runtime”. If you are not sure whether you have older version(s) of JDK, check!
Step 1: Download JDK
- Goto Java SE download site @ http://www.oracle.com/technetwork/java/javase/downloads/index.html.
- Under “Java Platform, Standard Edition” ⇒ “Java SE 8ux” ⇒ Click the “JDK Download” button.
- Check “Accept License Agreement”.
- Choose your operating platform, e.g., Windows x86 for 32-bit Windows OS or Windows x64 for 64-bit Windows OS. You can check whether your Windows OS is 32-bit or 64-bit via “Control Panel” ⇒ System ⇒ Under the “System Type”.
Step 2: Install JDK and JRE
Run the downloaded installer (e.g., “
jdk-8uxx-windows-x64.exe“), which installs both the JDK (Java Development Kit) and JRE (Java Runtime). By default, the JDK will be installed in directory “
C:\Program Files\Java\jdk1.8.0_xx“, where
xx denotes the latest upgrade number; and JRE in “
For novices, accept the defaults. Simply click “next”…”next”… to install JDK and JRE.
Take note of your JDK installed directory (which you will need to use in the next step). Check the JDK installed directory by inspecting these folders using Windows’ Explorer.
I shall refer to the JDK installed directory as
<JAVA_HOME>, hereafter, in this article.
Step 3: Include JDK’s “bin” Directory in the PATH
Windows OS searches the current directory and the directories listed in the
PATH environment variable for executable programs. JDK’s programs (such as Java compiler
javac.exe and Java runtime
java.exe) reside in directory “
<JAVA_HOME> denotes the JDK installed directory, e.g.,
C:\Program Files\Java\jdk1.8.0_xx). You need to include the “
<JAVA_HOME>\bin” directory in the
To edit the
PATH environment variable in Windows XP/Vista/7/8:
- Control Panel ⇒ System ⇒ Advanced system settings
- Switch to “Advanced” tab ⇒ Environment Variables
- In “System Variables”, scroll down to select “
PATH” ⇒ Edit
- (CAUTION: Read this paragraph 3 times before doing this step! There is no UNDO)
In “Variable value” field, INSERT “
c:\Program Files\Java\jdk1.8.0_xx\bin” (Replace
xxwith the upgrade number and VERIFY that this is your JDK’s binary directory!!!) IN FRONT of all the existing directories, followed by a semi-colon (
;) which separates the JDK’s binary directory from the rest of the existing directories.
DO NOT DELETE any existing entries; otherwise, some existing applications may not run.
Step 1(b): Download
Download “NetBeans IDE” installer from http://netbeans.org/downloads/index.html. There are many “bundles” available. For beginners, choose the “Java SE” (e.g., “
Step 1(c): Run the Installer
Run the downloaded installer. Choose your installation directory (e.g., “