This content has been marked as final. Show 5 replies
983265 wrote:Both description seems plausible. Just different levels of details. Neither is complete (a previous answer mentioned loading and initializing classes), it's merely the appropriate level of abstraction for the majority of us that are essentially interested in having their main() (and all other application code) executed.
most of the java books just tell that jvm starts the main method....
some wrote that user thread (called main)is created then from that thread just main method is invoked
Is it possible to know the internal mechanism of invoking the main method...There is probably no such thing as the mechanism, as different JVM implementations could probably choose different approaches.
If you need to know the exact specifications that all JVMs must comply with, look for the JVM specifications, in particular this chapter http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-5.html#jvms-5.2 (which mentions the freedom of implementation choices)
But again, why do you ask?
"Just out of curiosity" is a valid answer, but "because my program will sorely depend on this mechanism" would sound suspicious.