JDK is needed for application development, while JRE is enough to run applications. In other words, the JRE is enough to run the application (that is, it includes java.exe and does not contain javac.exe. JDK contains java.exe and javac.exe
There are other chances that you have set your class path correctly.
rgksugan
source share