Let's install JDK to work with java
First of all, we need to understand what is JDK. Well, it is the abbreviation of Java Development Kit. It contains JRE (Java Runtime Environment), JVM (Java Virtual Machine), development tools and libraries. One single file which is JDK will provide these all services by installing it on your computer.
Let's check whether java is working or not before installing it. You need to open CMD (Command Prompt) by searching on the search bar. Then open it.
After opening it, You should run "javac" command by typing javac and pressing enter key like below.
If you getting a message like the above, it means your computer did not install the JDK. ( also it means there is no java environment to identify "javac" command)
Links: Find and download the latest JDK on Oracle or download that I installed one
To install JDK follow the steps below,
Step 1:
just double-click on jdk file. Then there will be a message pop up like "Do you want to allow this app to make changes to your device?" from user account control in Windows. You have to click on "Yes".
Then after that, you need to do the same thing that I have shown below.
Click on Next button
This is JDK and better to keep the default installation path and click on Next button
This is JRE. It is also better to keep the default installation path and click on Next button
Now you have successfully installed the JDK file to the computer and you can click on Close button.
Step 2:
Once you install it, we have to give the path for the environment variables on your windows computer. Otherwise, java commands will not identify in your computer. To do that, follow the guide that I have shown below.
Go to the number 1 and number 2 folder
Then go to the number 3 folder
Go to the number 4 folder
Then go to the "bin" folder. This is a very special folder because executable binaries are stored in it. After going into the "bin" folder, you will see the inside of it like below.
Then select the path and copy using ctrl + C keys or right-click and click on copy. Choose any option to copy that path.
Once you copied that path, you need to right-click on "This PC" and then click on "Properties"
Then click on "Advanced system settings"
Then click on Environment Variables
Then select "path" on the list and click on "Edit" button
Click on "New" button
Then you can paste the copied path in here.
Once you pasted it, click on "OK" button
Click on "OK" button
Also, click on "OK" button
To check the this we have done correctly or not, open CMD and type javac and press enter key.
If you are getting this message, you have successfully installed JDK and entered the path correctly.
0 Comments