DEV Community

Cover image for How to setup java(IntelliJ) on windows
Mohammed Nadeem Shareef
Mohammed Nadeem Shareef

Posted on

How to setup java(IntelliJ) on windows

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 from Pixabay

Table Of Contents

First install JAVA compiler

  • Go to oracle JDK download
  • 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

  • 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.

  • Go to the download section on IntelliJ 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.

  • 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 and his JAVA playlist.

#EnjoyLearning.

This is Shareef.
My portfolio
Github
Twitter
Linkedin

Top comments (0)