Monday, June 9, 2014

Setting Up Your Java Development Environment - Java JDK and Eclipse

This tutorial shows you how to set up the Java JDK and Eclipse IDE as your development environment.

Download the following:
1. Java JDK 1.7  download
2. Eclipse IDE for Java EE Developers 4.3.2  (Kepler)  download

You may get confused by the number of choices from the download pages. It may seem so logical but a lot of new developers get confused which one to download.

See screenshots below for reference:

 For the Java JDK, you would want the JDK download of course.



For Eclipse, you would want the the Eclipse IDE for Java EE Developers if you want to develop web applications. Choose the 32 bit or 64 bit download, whichever matches your operating system.




1. Install the Java JDK

 Click on the downloaded Java JDK file and follow the prompts to install.

It will most likely be installed at a location similar to this :

C:\Program Files\Java\jdk1.7.0_55


2. Set the JAVA_HOME system variable

Configure the Windows Environment Variables with the JAVA_HOME system variable.

Click on Windows 'Start' button  >  Right-click on 'Computer'  >  Properties  >  Advanced system setting  >  Environment Variables

You will get the popup page below:




Click the 'New' button then enter JAVA_HOME and the location of your installed JAVA JDK like on the image below:




Click the 'OK' button and you should now see the JAVA_HOME variable under the System variables like the image below:




3. Update the PATH system variable with the path to the JAVA JDK bin folder

While on the Environment Variables page, scroll to the Path system variable and select it Then click on the 'Edit' button.

 See image below.



You will get the System Variable page below.


Edit the Path system variable and add the entry " %JAVA_HOME%\bin " to point the Path variable to the JAVA JDK's bin folder.

Click the 'OK' button to apply the new settings.

This setting will allow you to run Java commands anywhere.


4. Verify your Java JDK installation is working

Open a new command prompt and type "java -version".



You should get a response similar to this to indicate a successful installation of  the Java JDK.


5. Install the Eclipse IDE

Click on the downloaded Eclipse installation file and follow the prompts to install.

When prompted for the location where to extract the file, I prefer installing it in the C drive in my designated Java folder:

C:\_java

After installation, you will find in your designated folder the Eclipse application.

See image below:



That's it. Your are done.


No comments:

Post a Comment