Installation and Setup of JDK

What is JDK or JRE ?

JRE (Java Runtime) is needed for running Java programs. JDK (Java Development Kit), which includes JRE plus the development tools (such as compiler and debugger), is need for writing as well as running Java programs. In other words, JRE is a subset of JDK. Since you are supposed to write Java Programs, you should install JDK, which includes JRE.

I recommend that you install only the latest JDK. Although you can install multiple versions of JDK/JRE concurrently,but it is messy. Follow the below mentioned steps to install and setup JAVA/JDK.

How to install JDK in windows and set path?

  • Step 1: Goto
  • Step 2 : Choose your OS Version and follow the instructions to download the latest JDK version.
  • Step 3 : Start the JDK 15 installer by double-clicking the installer’s icon or file name in the download location. Follow the instructions provided by the Installation wizard.
  • Step 4 : Your jdk will be installed by default at location “C:\Program Files\Java\jdk-13.0.{x}“, where {x} denotes the update number.
  • Step 5: I shall refer to open the JDK installed directory and copy the path upto jdk-13.0.{x}\bin directory to setup PATH.
  • Step 6: Now to set the PATH variable on Microsoft Windows follow below mentioned steps.

To set the PATH variable on Microsoft Windows7:

  1. Select Control Panel and then System.
  2. Click Advanced and then Environment Variables.
  3. Under “System Variables” (the bottom pane), scroll down to select variable “Path” ⇒ Click “Edit…”.
  4. Add the location of the bin folder of the JDK installation to he PATH variable in System Variables.
  5. At last verify the JDK installation and path setup.
  • For Newer Windows 10:
    You shall see a TABLE listing all the existing PATH entries (if not, goto next step). Click “New” ⇒ Click “Browse” and navigate to your JDK’s “bin” directory, i.e., “c:\Program Files\Java\jdk-13.0.{x}\bin“, where {x} is your installation update number ⇒ Select “Move Up” to move this entry all the way to the TOP.

Verify the JDK Installation and PATH Variable

  1. Click “Search” button ⇒ Type “cmd” ⇒ Choose “Command Prompt”, or
  2. Right-click “Start” button ⇒ run… ⇒ enter “cmd”, or
  3. Click “Start” button ⇒ Windows System ⇒ Command Prompt
  4. On launch of command prompt , Type “javac“.
  5. This will show you some data as below.
Usage: javac <options> <source files>
where possible options include:
  -g                         Generate all debugging info
  -g:none                    Generate no debugging info
  -g:{lines,vars,source}     Generate only some debugging info
  -nowarn                    Generate no warnings
  -verbose                   Output messages about what the compiler is doing
  -deprecation               Output source locations where deprecated APIs are used
  • if you see anything else then this , your java path is not set properly. Plz set path again or.
  • If you do not set the PATH variable, then you must specify the full path to the executable file every time that you run it. For example:
SET PATH=C:\Program Files\Java\jdk_version\bin

Note:The PATH environment variable is a series of directories separated by semicolons (;) and it is not case-sensitive. Microsoft Windows looks for programs in the PATH directories in order, from left to right. You should only have one bin directory for a JDK in the path at a time. Those following the first instance are ignored.

for further any assistance regarding JDK download and installation on different OS. You may refer

Related posts

One Thought to “Installation and Setup of JDK”