Applet's Execution Environment
The Java Plug-in software creates a worker thread for every Java applet. It launches an applet in an instance of the Java Runtime Environment (JRE) software. Normally, all applets run in the same instance of the JRE. The Java Plug-in software starts a new instance of the JRE in the following cases:
- When an applet requests to be executed in a specific version of the JRE.
- When an applet specifies its own JRE startup parameters, for example, the heap size. A new applet uses an existing JRE if its requirements are a subset of an existing JRE, otherwise, a new JRE instance is started.
An applet will run in an existing JRE if the following conditions are met:
- The JRE version required by the applet matches an existing JRE.
- The JRE's startup parameters satisfy the applet's requirements.
The following diagram shows how applets are executed in the JRE.