Java is a very powerful programming language. You can do pretty much everything in Java. An IDE will be helpful but you don't always need an IDE to get started with Java. Instead, you can simply write text files with the .java extension and compile and run them manually. Setting such a simple development environment for Java is often a bit tricky for beginners. Because you don't just have to install the necessary files, but you have to also mess with some of the system environment variables. It might seem very difficult for a beginner, but it is actually pretty simple.
From a beginner's perspective, Java Development Kit seems very confusing at first. But it is actually pretty straightforward once you understand it.
In order to do this, you have to install 2 important files. One is Java Runtime Environment (JRE) which lets you execute java programs and java classes, and the other one is Java Development Kit (JDK) which lets you manually compile java programs from the command line. It is very easy and straightforward to install the Java Runtime Environment(JRE) but an installation alone won't be enough to get you started when it comes to Java Development Kit(JDK).
Web Design for Beginners in Malayalam - Full Course (മലയാà´³ം)
WATCH VIDEO
Java version names are also very confusing at first. So, in this article, we are focusing on how to install and configure the Java 8 SE version of both JDK and JRE.
So here is a step-by-step guide to installing and configuring JDK and JRE in your Windows 10 Machine.
- Download JDK 8 exe file for your system (x86 if 32bit or x64 if 64bit)
Download JDK - Download JRE 8 exe for your system (x86 if 32bit or x64 if 64bit)
Download JRE - Install JRE exe file first. Do not change the installation directory(because that can make it even more confusing if you are a beginner). Follow the instructions in the installation wizard and install it with everything default.
By default, it will be installed in C:\Program Files\Java - Now install the JDK exe file. Just like before, follow the installation wizard and do a default installation. It should by default get installed to the same folder where JRE got installed(if you didn't change anything).
By default it will also be installed in C:\Program Files\Java - Now, open the file explorer and navigate to the installation directory. ie. C:\Program Files\Java
In this folder, you will see 2 folders with names similar to what you see in the image below: - Now open the jdk1.8.0_291 folder
- Now, Go to Start → Search and Search for Control Panel and open it.
- Now from the search result, click on Edit the system environment variables (the one with that icon on the left)
- From the System Properties Window which just opened up, click on the Environment Variables Button
- In the window which just opened up, you will see two sections namely User variables for <your username> and System variables
We have to click on New in the System Variables section - In the dialog which just opened up, type JAVA_HOME as the Variable name and paste the address of the jdk folder you copied before in the Variable value field.
- Now, on the system variables section, find a System variable called "Path"
Click to select it and then press the Edit button - In the window being opened up, Click on New and type the following as a new path
%JAVA_HOME%\bin
- Press OK and close all the windows.
Now we have successfully completed the installation as well as configuring of JDK and JRE in Windows 10.
Open Command Prompt and type javac -version to see if the environment variables are successfully set up. If it shows a version, then it means everything was done correctly.
cd [FOLDER LOCATION ADDRESS]
javac programfilename.java
java programfilename
Video: How to Set-Up Java JDK and JRE in Windows 10 with Environment Variables to Work on Command Prompt
This is a quick little tutorial on how to install and configure Java Development Kit and Java Runtime Environment in Windows 10 to easily compile and execute your java programs. This will help you get started with programming in Java the easiest way.
Thank you 😌
ReplyDeleteYou're welcome
DeleteThank you!
ReplyDeleteYou're welcome
Delete