How to setup java(IntelliJ) on windows
Tags: java, programming, setup, intellij
Published: 2021-04-14 14:54:36

> Java runs on millions of machines but it is started to show its age, **JAVA** is not the hot language of the time but as **JAVA** is purely made up of OPPs concept, learning and understanding it will be helpful.

background image by [b1-foto](https://pixabay.com/users/b1-foto-2445766/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=2327538) from [Pixabay](pixabay.com)

## Table Of Contents
* [Install JAVA compiler](#install-java-compiler)
* [Setup environment variable](#setup-environment-variable)
* [Install IntelliJ IDE](#install-intellij-ide)
* [Hello World Program](#hello-world-program)

## First install JAVA compiler <a name="install-java-compiler"></a>

- Go to [oracle JDK download](https://www.oracle.com/java/technologies/javase-jdk16-downloads.html)
- Windows users download **Windows x64 Installer**.
    - Accept the license agreement then click **download**.
- After downloading JDK, go to downloads, open the file(which you just downloaded).
    - Click on next and next then wait till it gets installed.
    - After installation is completed, click on close.
- Check if JDK is downloaded or not
    - open cmd (YOu can open cmd by clicking the windows button and search for cmd, a black terminal will be open)
    - type "java --version"
    - If it shows something like 15.0.2 then congratulations, JAVA is installed, if not then also congratulations, you got your first error.

## Setup environment variable <a name="setup-environment-variable"></a>

- Click on the Windows button, search "environment variable" click on it.
    - A window will pop up, on the bottom left click on "environment variable".
    - select "path" then on "edit".
    - Click on "new".
    - Paste "C:\Program Files\Java\jdk-15.0.2\bin" or your "java/bin" path.
- Click "ok" and "ok" and "ok".

Now you are set to install **IntelliJ** IDE.

## Install IntelliJ IDE. <a name="install-intellij-ide"></a>

- Go to the download section on [IntelliJ](https://www.jetbrains.com/idea/download/#section=windows) website
- Click download "Community version"
- After completion of the download, open the file.
- Click next, next and next, then click install
- After installation, open Intellij.

Let's write your first program "hello world" in Intellij.

## Hello world program. <a name="hello-world-program"></a>

- Open freshly install Intellij IDE.
- Click on "new project".
    - Select JAVA on the top left corner.
    - Click next.
- Tick "create a project from template" on the top left side.
    - Click next.
- Name your project as **hello world**(You can name whatever you want)
    - Click next.
    - It will load for a min or 2
- Intellij will give you a starting template.
    - Type "sout" Intellij will give you a suggestion press enter.
    - If you didn't get a suggestion type "System.out.println("Hello World!!!");"
- On the top right corner click on the run button.
- You can see your output in the terminal window.

**Congratulation you have set up JAVA successfully and written your first JAVA project.**

## Conculusion

> Setting up is not enough to learn further I recommend **TheNewBoston** [youtube channel](https://www.youtube.com/user/thenewboston) and his [JAVA playlist](https://www.youtube.com/watch?v=Hl-zzrqQoSE&list=PLFE2CE09D83EE3E28).

## #EnjoyLearning.

> This is Shareef.
[My portfolio](https://portfolio.shareef.vercel.app/)
[Github](https://github.com/shareef99)
[Twitter](https://twitter.com/shareefBhai99)
[Linkedin](https://www.linkedin.com/in/nadeem-shareef-7a8394182/)