Java – Environment Setup

code Computer Skills Java

Requirements for Java Environment Setup:

  1. For executing a JAVA based application: JRE (Java Runtime Environment)
  2. To develop any JAVA based application: JDK (Java Development Kit)
  3. For developing and maintaining Java applications: IDE

In this article, I will guide you with getting done with the java environment setup. It includes installing JDK (latest version) and Eclipse IDE as a prerequisite, for developing JAVA applications.

JDK Installation

Steps to install JDK on the local system:

  1. Download the latest version of JDK from the website.
  2. After that, install JDK by giving the required permissions. Set it up with the default settings.
  3. After successfully installing JDK, restart your PC.

Verifying JDK Installation:

After restarting your system, follow the below steps to verify successful JDK installation:

  1. Open the command prompt by pressing [Windows+R], type cmd and hit OK.Run Window
  2. Enter the command “java –version” and see the output in the command prompt window. You should be able to see your current version of java. It should show output as below:Command Prompt

If the above output is not visible, it is because the path of the JDK installation is not added to the system variable which maintains the java installation path. You have to manually do it.

Here is how you can add the location of the JDK installation to the PATH system variable.

Setting the Path Variable:

  1. Right click on the icon This PC/ My Computer.
  2. Go to Advanced system settings on the left side of the properties window.
  3. In the Advanced tab of the properties window, click on the Environment Variables button as shown in the below image.Setting Environment variable
  4. Select the variable Path in the System Variables and click on Edit
  5. Add a semicolon at the end of the current value and add the JDK bin path (C:\Program Files\Java\jdk-11.0.2\bin) without brackets and click Ok.
  6. After successfully applying the above changes, check the version from Command Prompt windows as per above steps.

Install Eclipse IDE

Eclipse is the most widely used IDE with great features and plug-ins which will help you in your learning process.

These are the steps you need to follow to install eclipse on your system:

  1. Go to this page and download eclipse installer.
  2. Run the Eclipse installer and select Eclipse IDE for Java Developers.
  3. Select your preferred installation folder, shortcut settings and accept all license agreements and click on install.
  4. Once the installation is complete, there will be a desktop icon as well as the Start menu item created for Eclipse.

Now that Eclipse is successfully installed in your systems, Java environment setup is all done. You are all set to start learning to programme in Java.

In the next article, you will learn to write the first Java program and the basics of Java.