I’m trying to learn Java. I was going through many documents. I understood that, wen we give javac command, the files are compiled and Bytecodes are produced.
After this we are giving java command to Run the program.
- I want to know what is happening in the background?
- I mean how Jvm is invoked?
- who is invoking the JVM?
- How classes are getting loaded?
The
javacommand will launch the JVM. I am not sure if the two can be considered synonymous, but for all intents and purposes this is the result.When the JVM is launched, the classes are loaded into memory and then the main class is executed. The specifics of the JVM execution are rather complicated and IMO not fit for a single question. As TS- pointed out, the specification is out there.