Java Tutorial - Setup Your Windows Development Environment

For Java beginners, I recommend to start with setting up a development environment. It is easier to understand concepts by running actual code and testing them. This Java tutorial is written to help newbie Java programmers to prepare their Windows Development Environment.


These are the steps for this guide.
  • Install Java Development Kit (JDK) - if you come from another programming language, the JDK is similar to a compiler
  • Install Eclipse IDE - this is the most common tool used by Java developers for coding
  • Create and Run a Sample Java Application - use Eclipse to create and run a simple application

Install Java Development Kit

A Java Runtime Environment (JRE) is required to be installed on your computer when you need to run a Java application. Unlike usual applications, a Java program does not have an .exe file. Java programs are executed with the help of JRE.
But when developing Java applications, You will need to install a Java Development Kit (JDK). This comes with additional tools that helps to compile your code and be able to run later.
Download the latest JDK released from the Oracle website. For this tutorial, JDK 1.7 will be used. The installer is available here (
Execute the downloaded file and follow the instructions. When installation is completed, it is recommended to set the JAVA_HOME environment variable and point it to where you installed the JDK.

Install Eclipse IDE

You can start Java development by just using a notepad. But I highly recommend to use the Eclipse Integrated Development Environment (IDE) for convenience purposes. You will eventually end up using an IDE later as you become more serious with Java programming.
Go to the website and download your preferred release (
Extract the downloaded zip archive. To run eclipse, just double click on eclipse.exe
The Workspace is the root folder where Eclipse will save your work. Just choose the default for the meantime and click OK.
This is how Eclipse looks when opened
The large white area in the center is where you will type your code. The Package Explorer on the left is like the File Explorer in Windows. This is used to navigate through the files of your projects. You can learn the other parts of Eclipse as you progress with learning Java.

Create and Run a Sample Java Application

The following steps will guide you on how to create a sample Java application.
The first step is to create a project. A project is like a collection of source files that comprises a program.
Click on File, New, and then Java Project:
Give a name to your project and click Finish:
Now that you have a blank project. The next step is to create a Java class source file.
Right click on your project, New, and then Class:
Give the class a name and click Finish:
The code for the new class can be edited in the center area. Use the following code:
public class Sample {
	public static void main(String[] args) {
		System.out.println("Hello World");
What the code does is just to simply print "Hello World" on the screen.
To run the program, right click on the class file, Run As, and then Java application:
The output of your program will be shown at the Console tab near the bottom part of Eclipse:

Recommended IDE - IntelliJ IDEA

In my opinion, Free and Open Source IDE's such as Eclipse and NetBeans are great when you are beginning your journey with the Java language. There is no cost involved and you can enjoy great feature set. But when you decide to pursue Java programming more seriously, I highly recommend IntelliJ IDEA. Here is a sample screenshot:

I acquired a license back in December 2012 and I never looked back. My productivity increased significantly and the only regrets I have is on not using it earlier in my career. Here are some of my favorite reasons for using it:
  • Understand almost all the popular frameworks and technologies - integrating everything beautifully for a nice coding experience. Frameworks includes Java, css, javascript, maven, gradle and others.
  • Important features are included in the default install and works out of the box. Plugins are stable and easy to install. I appreciate this because working with other IDE sometimes takes days to setup properly the features I need.
  • IntelliJ is famous for making difficult refactoring tasks easy.
  • Autocomple features are insane and it feels like the IDE can read your mind.
For me, adding up all the conveniences easily makes me at least 50% more productive. I believe that every team involved in professional work should be using it. To know more about IntelliJ, you may visit their website here.


The important part in this tutorial is to setup your programming environment and to know how to create/run Java programs. Other concepts will be covered in future tutorials.