Installation

Latest JDK 9 was released on September 21st 2017 we will be installing the same

You can download JDK installers for different platforms by clicking Download JDK

We will cover here 3 platforms Windows, Mac OS and Linux.It will be almost same for any other OS.

Windows

Download the windows executable shown above and run setup you will find the directory structure on completion as follows.
Unlike the old structure which had JRE inside JDK we have now 2 separate folders for JRE and JDK


The directories as discussed before are almost the same(Bin,Include,Lib).Since I have not installed Documentation and Demo they are missing here.

Now lets check can I run Java program from anywhere in my pc
From the Command Prompt execute command Java if you see something like this you are ready to take a ride.

Linux
I will be using Centos 6 distribution here however you are free to use any other distribution of your choice.Since Centos 6 is fedora based download the rpm file from above link and run the same using package installer.I am using JDK 8 here since my system is 32 bit and JDK9 is only available in 64bit.
In terminal run java if you get response you are good to go.
There are various other repositories and tutorials available for Debian based linux.I will update that in future. 

Mac OS X
For Mac OS download the dmg file and mount the same now run the mounted file and follow instructions

Run the command in terminal in mac and if you get the output you are good to go.


Remember for rest of tutorial I will use windows or Linux at some places if required.

Integrated Development Environment(IDE) Setup
  • We can use a variety of IDE's for Java programming.
  • Some of the IDE's are as follows.
    • Eclipse
    • Spring Tool Suite (STS)
    • Netbeans
    • Jetbrains intellij idea
  • We will be setting up using eclipse.
    • Let's first configure the Java environment to use.
      • Go to Window -> preferences
      • Select installed JRE's
        • Execution Environments
        • select the installed JDK location and not JRE because build tools like ANT, Maven and Gradle need JDK to build our project and will not work with JRE.
      • Preferred is JDK 1.8.

No comments:

Post a Comment