The JVM works as a Just-In-Time (JIT) compiler. There are many sources of information about compiling JIT, but basically, how a Java program works, it will encounter part of the necessary program, these parts of the program are in .class files. These .class files are just an intermediate form of Java code (this is not exactly Java code, but not quite machine code). Obviously, runtime compilation (JIT) requires resources (CPU cycles) and therefore time. Thus, the JVM loads only the parts of the program that are necessary to minimize the processor cycles.
But yes, your understanding of the process / programs is correct. To summarize: a process is an executable instance of a program. This running program can then spawn even more processes or threads to do the work.
Rich e
source share