JAVA Basics #1 - Installation
Tags: java, programming, beginners, jdk
Published: 2021-05-07 04:04:44

#Introduction to Java
This is the first article of the series of articles *Basics of Java*. This article set is ideal for beginners because in this articles series we are going to learn Java from the scratch.

>Java is an object-oriented and class-based programming language that was released by Sun Microsystems in the year 1995.

![alt text](https://raw.githubusercontent.com/chathuRashmini/Blog-Images/main/Blog%20images/javaFetures.png?token=APOCKOZIARDC57MISO3DK33AR5OKI)

#Java Installation for Windows

To code and execute java programs you have to have Java Development Kit (JDK) installed in your machine.
**JDK IMAGE**
![alt text] (https://raw.githubusercontent.com/chathuRashmini/Blog-Images/main/Blog%20images/jdk.png?token=APOCKO3L73PPNUPOFZB6NJLAR5OGE)

First you have to visit [this site](https://www.oracle.com/java/technologies/javase-downloads.html), and click *'JDK download'* of the latest version as show in the given image.
![alt text6](https://raw.githubusercontent.com/chathuRashmini/Blog-Images/main/Blog%20images/inteliJ6_java.PNG?token=APOCKO54QW2QS4ID3BKW52LASCXOC)

It is not prohibited to have several JDK versions in the same machine, but it is always recommended to have only the latest version.

Next you will be directed to a page looking like this;
![alt text7](https://raw.githubusercontent.com/chathuRashmini/Blog-Images/main/Blog%20images/inteliJ7_java.PNG?token=APOCKO2EP7I5ATWMV4GKS3LASCYW4)

Scroll down till you reach the grid *'Java SE Development Kit'*. There you have to choose the file matching to your operating system. Then accept the license agreement and hit download.
![alt text9](https://raw.githubusercontent.com/chathuRashmini/Blog-Images/main/Blog%20images/inteliJ9_java.PNG?token=APOCKOY7TXGIJ7E2L4JSNXLASCY3Q)

Once the download is completed, open the downloaded file and let it to be installed. All you have to do is following the instructions given in the menu boxes.

###Setting Environment Variables
Once the installation is completed you have to set environment variables. First go to the folder where you have installed the JDK. Then proceed to the *bin* folder. Copy the path up to there.
![alt text11] (https://raw.githubusercontent.com/chathuRashmini/Blog-Images/main/Blog%20images/inteliJ11_java.PNG?token=APOCKO4LLHDJTE3C55LNDB3ASCZEM)

Then go to the *Settings* of your machine and select *System*.
![alt text12](https://raw.githubusercontent.com/chathuRashmini/Blog-Images/main/Blog%20images/inteliJ12_java.PNG?token=APOCKOYMGBT2JZ6XOOWXEODASC3NG)

Then select the following option.
![alt text13](https://raw.githubusercontent.com/chathuRashmini/Blog-Images/main/Blog%20images/inteliJ13_java.PNG?token=APOCKO7O7P5C3TVYQWXLNILASC3PS)

After that you have to select 'Environmental Variables...'
![alt text14](https://raw.githubusercontent.com/chathuRashmini/Blog-Images/main/Blog%20images/inteliJ14_java.PNG?token=APOCKO6TDHL35JHDM3RBBNTASC3RO)

Next, select the variable *'path'* and click *'Edit'*.
![alt text15](https://raw.githubusercontent.com/chathuRashmini/Blog-Images/main/Blog%20images/inteliJ15_java.PNG?token=APOCKO7T2WJ74Y5Z2HM3YBTASC3TU)

Click *'New'* and paste the path (to bin folder) that you have copied before, and hit *OK*.
![alt text16](https://raw.githubusercontent.com/chathuRashmini/Blog-Images/main/Blog%20images/inteliJ16_java.PNG?token=APOCKO5WMSYAGZQDSK7AW63ASC3VQ)

###Setting System Variables
Now you have to set system variables. Here you have to copy the path up to *bin* folder (excluding it).
Click *New* in system variables section and give a name and the path and hit *OK*.
![alt text17](https://raw.githubusercontent.com/chathuRashmini/Blog-Images/main/Blog%20images/inteliJ17_java.PNG?token=APOCKOZC7QPFK4PUSVWS6Z3ASC3YW)

Now we are ready to check whether you have successfully completed the process. First go to the command prompt. Then type **java -version**. Then if you see the result showing your java version, congratulations you have done perfectly so far.
![alt text20](https://raw.githubusercontent.com/chathuRashmini/Blog-Images/main/Blog%20images/inteliJ18_java.PNG?token=APOCKO6NBTYG5OWYFXX6ZBLASCYO4)

With that we have come to the end of this article. In next article you will learn how to download and install intelij idea in your machine.