Java software is divided into two sub products
1) jdk (Java Development Kit)
2) jre (Java Run time Environment)
jdk has both "Compiler + JVM"
jre has only "JVM"
JVM is a sub-part of jre and jre is a sub-part of jdk. So in order to run any java application jre software is sufficient but if we need to compile and execute the java program we have to install jdk software.Below diagram shows the difference between jdk,jre and JVM.