Requirements for Java Environment Setup:
- For executing a JAVA based application: JRE (Java Runtime Environment)
- To develop any JAVA based application: JDK (Java Development Kit)
- 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.
Steps to install JDK on the local system:
- Download the latest version of JDK from the website.
- After that, install JDK by giving the required permissions. Set it up with the default settings.
- After successfully installing JDK, restart your PC.
Verifying JDK Installation:
After restarting your system, follow the below steps to verify successful JDK installation:
- Open the command prompt by pressing [Windows+R], type cmd and hit OK.
- 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:
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:
- Right click on the icon This PC/ My Computer.
- Go to Advanced system settings on the left side of the properties window.
- In the Advanced tab of the properties window, click on the Environment Variables button as shown in the below image.
- Select the variable Path in the System Variables and click on Edit
- 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.
- 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:
- Go to this page and download eclipse installer.
- Run the Eclipse installer and select Eclipse IDE for Java Developers.
- Select your preferred installation folder, shortcut settings and accept all license agreements and click on install.
- 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.