tags:

views:

48

answers:

3

Applets are run inside browser's JRE. Does this mean that you do not have to have JRE installed on your machine in order to run an applet?

+3  A: 

The "browser's JVM" is the JRE that you have installed on your machine. Browsers don't typically come with their own, they just use whatever you've got installed on your system already.

Perhaps you've confusing Java with JavaScript, which are actually totally unrelated to each other.

Dean Harding
So that means the browser creates an instance of the JRE that you have installed on your machine, the applet is then run within the JRE instance running in the browser. Correct?
@vickey21: That is correct, yes.
Dean Harding
+1  A: 

If the browser provides its own JVM, then no, you don't need the JRE installed. But I believe that many major browsers do not provide their own JVM; they will use whichever one (or ones) you separately install, and that is typically a Java plugin provided by the JRE. So for most browsers, as far as I know, you do need to install the JRE or some equivalent. Internet Explorer is the only major browser I can think of that might have its own JVM.

David Zaslavsky
A: 

JRE "is" the Java Virtual Machine (JVM) behind the curtains...

From Wikipedia:

Advantage: An applet can work on "all" installed versions of Java at the same time, rather than just the latest plug-in version only. However, if an applet requires a later version of the Java Runtime Environment (JRE) the client will be forced to wait during the large download.

Disadvantage: Some applets require a specific JRE. This is discouraged.

Leniel Macaferi