According to the current design an initial JVM is launched by JVMLauncher, and the second JVM, which is running an applet, is launched by RemoteJVMLauncher invoked via ProxyJVMLauncher. If the second JVM process is terminated by some reasons, (e.g. running applet executes System.exit()), the WorkerThread for the corresponding JVMInstance and the pipe are terminated, but nobody is notified about this and the JVMInstance remains in the active list of JVMManager. So if we try to start the same applet with the same JVM parameters again, JVMManager tries to re-use the old JVMInstance. The JVMInstance will fail to send StartAppletMessage since the pipe does not exist.
When a WorkerThread for a JVMInstance is terminated, we have to destroy the corresponding ProxyJVMLauncher, if any. Also if ProxyJVMLauncher.destroy() is executed and a pipe conversation between ProxyJVMLauncher and RemoteJVMLauncher is over, ProxyJVMLauncher will set the exit indicator. This will prevent the future usage of the terminated JVMInstance.