我需要一步一步地解释当我们调用时到底发生了什么,java -jar JAR_FILE.jar
直到 JVM 完成它的工作并返回。
阶段如何准备好让 JVM 在主机上运行?
调用了哪些函数?创建了哪些线程?
当 JVM 将要关闭时会发生什么?
Here is my list of steps it is very high level.
This is a really simplified list, full details are much more specific and are probably dependent on the JVM implementation.
You might want to look at this book Inside the Java Virtual Machine 2nd Edition for a something more readable than the JVM spec http://www.artima.com/insidejvm/ed2/