· If you want to install java in your system download the Java SE ( https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) which is free available.
We set path for java in two ways.
1. Temporary path:
Using command prompt set the path for that copy the link of JDK directory.
set path=D:\program files\java\jdk1.8.0_23\bin
2. Permanent Path:
You have to following below mentioned steps for setting JDK path permanent.
Using My Computer properties -> advanced tab -> environment variables -> new tab of user variable -> write path in variable name -> write path of bin folder in variable value -> ok -> ok -> ok
Setting path for Linux OS:
it is same as windows OS but in this wee use export tool instead of set.