Why is jvm called a machine




















Friends i will be thankful if anyone tells me why JVM is called virtual machine. I want a brief answer. JVM is called virtual because it is not a physical device and it does not physically exists. Role Of Interpreter: interper interprets the java byte code and executes that byte code. Why java Platform independent: lets ake an example of C language. Connect and share knowledge within a single location that is structured and easy to search.

I am not able to find proper explanation. I could find reasons for why JVM is called virtual machine but not for why jre is not called as virtual machine. Please help. Stack Overflow for Teams — Collaborate and share knowledge with a private group.

Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Asked 1 month ago. Discrete Mathematics. Ethical Hacking. Computer Graphics. Software Engineering. Web Technology. Cyber Security. C Programming. Control System. Data Mining.

Data Warehouse. Javatpoint Services JavaTpoint offers too many high quality services. JVMs are available for many hardware and software platforms i.

JVM is platform dependent. But implementation provider is independent to choose the algorithm. Its implementation has been provided by Oracle and other companies. Runtime Instance Whenever you write java command on the command prompt to run the java class, an instance of JVM is created. The Java Virtual Machine converts the compiled Java code into machine language to run it on the host computer. Today, we still have the idea in the form of web applications.

With langugage such as Turbo C, the compiler produces a platform dependent code, and there is no need for a Virtual Machine as the compiled Turbo C program can be executed directly by a physical CPU. In case of Java, the compiled code is a set of instructions for a virtual CPU which should work the same on every physical machine.

In this way, the designers of the Java language made the langugage platform independent. But since the code will run on a physical platform, they had to opt to put all the platform dependent code part in the Java Virtual Machine. The Java Virtual Machine is not a virtual machine unlike a cloud server instance. No hardware other than the processor is actually virtualized in case of Java Virtual Machine.



0コメント

  • 1000 / 1000