Today one of my juniors had this doubt whether she should install JRE or JDK on her system so I thought to share the difference on the same.
JRE: Java Runtime Environment , as the name suggests it provides required environment with its java libraries and java virtual machine(JVM) to run java programs. If you only need to run java programs then JRE is the only thing that you need on your system.
However, with JRE you can only run compiled java programs, it cannot compile java programs as it doesnt contain java compiler i.e javac to do the same. If you look into the bin folder of a JRE you wont find any javac.
JDK: Java Development Kit, it is a development kit that contains complete JRE alongwith other java development tools like java compiler i.e javac , a documentation generator i.e javadoc , java debugger. Using JDK, you compile .java files to .class files that contain bytecodes understandable by the JVM.