Before proceeding with the actual coding, we need to understand first what we gonna need to run and compile java program.Â We will need two things a facility to compile and run java programs. So basically we will gonna need a JRE and JDK.
Before we go in the technical details in our java installation we have to know what is the difference between a JRE and JDK. What we need to have?
Lets discuss first what is JRE
JRE – stands for Java Runtime environment which is theÂ Java Virtual Machine where your Java programs run on. It also includes browser plugins for Applet execution
Now we know what is JRE, lets discuss what is JDK
JDK – stands for Java Development Kit which is fully featured software bundles in developing java programs. It includes JRE, compilers, and tools like JavaDoc and Java Debvgger).
Usually, when we only care about running Java programs on browser or computer, we will only install JRE. It’s all we need. On the other hand, if we are planning to do some Java programming, we will also need JDK.
Where to get JDK?
You canÂ get the Java Developement Kit (JDK) Â depending your operating systemÂ inÂ Oracle JDK Download Page
Java Installation Checking and Validation
Before anything else we need to understand first one general rule in running your java application. If you compile your java application in java 1.5, then JRE 1.5 is the minimum requirements. Running a compiled java code in lower runtime environment version will result to runtime exception.
To check what version of java we have on our system we just need to check it in command prompt by typing
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)
Similarly in order to confirm if we have JDK installation on our machine we just need to run the following
No we have already a java installation lets move on to Java IDE Discussion.