In Windows XP when does the JVM start (JRE version 1.4 and higher)?
And when does it halt?
Does the JVM start when we launch a java application (or by executing java classfile)?
And does the JVM halt when the all the java applications on the system end? According to the documentation, the JVM halts in two situations: 1. when you terminate the java application by Ctrl+C and 2. when the 'exit' method of the System class is called. But one of my friends is arguing that the JVM starts when the system is booted and doesn't halt till the system is shut down
Does the halting of JVM imply the stopping of GC also?
The reason that the answer to my above questions is intriguing me is to answer a serious question on when does the JVM finalize all the unreachable objects? As everyone knows the GC may or may not finalize all the unreachable objects. This depends on the particular algorithm that the GC is using for recycling garbage. So if the JVM halts then the GC will also not be present to collect all the garbage memory. I got this question because there is a deprecated method runFinalizersOn Exit in the 'System' class. So the presence of this method indicates that the 'finalize' methods may not run even after the JVM exits (halts).
And when does it halt?
Does the JVM start when we launch a java application (or by executing java classfile)?
And does the JVM halt when the all the java applications on the system end? According to the documentation, the JVM halts in two situations: 1. when you terminate the java application by Ctrl+C and 2. when the 'exit' method of the System class is called. But one of my friends is arguing that the JVM starts when the system is booted and doesn't halt till the system is shut down
Does the halting of JVM imply the stopping of GC also?
The reason that the answer to my above questions is intriguing me is to answer a serious question on when does the JVM finalize all the unreachable objects? As everyone knows the GC may or may not finalize all the unreachable objects. This depends on the particular algorithm that the GC is using for recycling garbage. So if the JVM halts then the GC will also not be present to collect all the garbage memory. I got this question because there is a deprecated method runFinalizersOn Exit in the 'System' class. So the presence of this method indicates that the 'finalize' methods may not run even after the JVM exits (halts).
Comment