I was asked the difference between the two... I said..that JRE can stand alone run the java applications in case of Resource shortages.. and can function without JVM also..
Can some one add some more things to this aspect.... Please ..... Sunil
"Learning is weightless, a treasure you can always carry easily." -Chinese Proverb
The JRE (Java Runtime Environment) is the equivalent of a JVM but for running applications outside of a browser (like from the DOS prompt). When you run an applet or servlet it is running in a JVM (Java Virtual Machine). It is actually a set of specifications that Sun gives to the makers of browsers to follow when creating their JVMs.
so parmeet Does that mean that when I compile a program from Dos prompt then I am just using the JRE and not JVM ..are they really separate or just a subset... thanks for your reply.. Sunil Choudhary
"Learning is weightless, a treasure you can always carry easily." -Chinese Proverb
The JRE is a product from Sun which has a JVM in it. A JVM is an implementation of Sun's specifications for something - could be hardware, could be software, could be a browser - which interprets the Java byte code, executing it on a platform.