Hence, it eliminates the unused memory by itself. Let’s talk about facts before Garbage Collector and after Garbage Collector.īefore Garbage Collector, all programs and their memory management were done by the programmer which includes reclaiming the occupied memory that was used by an unused/inactive java program.Īfter Garbage Collector, this is the responsibility of Java Virtual Machine to manage memory by the automatic garbage collector, which identifies the unused memory by the program automatically. One of the very important responsibilities of Java Virtual Machine is memory management where Garbage Collector comes into the picture. Only a Java Virtual Machine can understand the bytecode and even if the operating system is different bytecode will execute on the JVM because bytecode has no platform-dependent code and JVM need hardware to be run and bytecode needs JVM. Therefore, ByteCode is a middle-level language between Java code and the machine language. 1.3 What is ByteCode?Īs we discussed above, Java Virtual Machine uses bytecode and then convert it into machine code.
![java 1.7.0 virtual machiene java 1.7.0 virtual machiene](https://www.oracle.com/ocom/groups/public/@otn/documents/webcontent/1601069.png)
To make Java platform-independent, running it on a virtual machine is very important and that’s why JVM was introduced.īack to the topic, JVM analyzes and executes the Java bytecode that was compiled by the Java compiler.Īs per the documentation, JVM doesn’t know the Java code but it only understands the class file and the bytecode available in a class file.
JAVA 1.7.0 VIRTUAL MACHIENE SOFTWARE
Therefore, Virtual Machine is computer software that behaves like a physical device or software implementation of a physical machine. As the word Virtual defines, Virtual is something that is not present physically.