Setting Up and Testing Local Java Development Environment


The Java Development Toolkit ( JDK ) must be downloaded and installed. In Windows 8, the default installation path is:

Step #1: Confirm if Java is installed 

Open the Command Prompt (Press Win + R, and type cmd, press Enter ). Once the command prompt launches, it should look like:

command prompt

Now, type:

Make sure, they are spelt correctly and in small-caps.


This confirms that, the JDK is installed and we are ready or we go to step #2.

Step #2: Look for the folder and set environment variables

You might find the following error on the command prompt:


You can verify the default installation path and see whether the folder is at the aforesaid location or not. If missing, re-confirm, it might have been accidentally placed at some other location while installation. Otherwise, re-install the JDK with default settings for the time being. Go to Step #3.

Step #3: Setting up the Environment Variables

Right Click on My Computer ->Properties->Advanced System Settings->Environment Variables

Within the System Variables,  set few variables:

  • JAVA_HOME : This is the path to the installation directory of the Java Development Toolkit.


  • Path: This is the path for the binaries ( \bin folder). There might be some other values within the Path System Variables, so place the following code at the beginning.

Make sure, there are no white-spaces between the % and \ characters.


Click on OK->OK->OK. This will close the System Properties window.

Now, close the command prompt (if already opened). Re-open the command prompt, and check for these commands:

and you should see the following:

Java Tests

Step #3: Write Simple “Hello World” Program in Java

Open Notepad and type the following:

and save the file at the location d:\java_codes just for the time-being. Type the following code:

In order to compile the file:

In order to see that a (.class) file with the same name as that of class is generated called, byte codes:

In order to execute the application, the utility is java

The output looks like:


Hopefully, this article will help newbies for their first step towards Java Development. Happy Coding!!!



Would You Mind Sharing?


Be the first to comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.