Originally posted by Pratibha Nandwana:
Hi
I am unable to understand that what is jvm and why is it called virtual machine ? Also what is meant by loading the class ?
Hello Pratibha,
Well as Arun said above, JVM is the acronym for Java Virtual Machine. It is basically a platform used to convert Java Bytecode into machine language.
All other programming languages convert the source code directly into machine code to run on a specific platform (microprocessor architecture or OS) but JVM first converts the source code (.java file) into byte code (.class file) and then into machine understandable code.
This conversion into bytecode is what makes Java a platform-independent language since byte code can be understood and interpreted by any microprocessor architecture and by any OS.
Hence your code becomes platform-independent. So JVM is in essence, a Java-processor and since it is a processor, so it is called a machine...rather a virtual machine as it virtually converts the source code into bytecode.
The JVM knows nothing of the Java programming language. It only knows and supports binary format, the class file format. A class file contains Java virtual machine instructions (or bytecodes) and a symbol table, as well as other ancillary information.
Hope this helps