Why is jvm platform independent
Home C VB. Is JVM platform independent? What is JVM? What gives Java its 'write once and run anywhere' nature? What is the garbage collector in Java? What is numeric promotion? Why do we need Generic Types in Java? What does it mean to be static in Java? What are final variables in Java? How Do Annotations Work in Java? How do I use the ternary operator in Java? What is instanceof keyword in Java? How ClassLoader Works in Java?
What are fail-safe and fail-fast Iterators in Java What are method references? Does garbage collection guarantee that a program will not run out of memory? How setting an Object to null help Garbage Collection? The JVM is used to both translate the bytecode into the machine language for a particular computer, and actually execute the corresponding machine-language instructions as well.
The JVM and bytecode combined give Java its status as a "portable" language. Given the previous information, it should be easier to deduce an answer to the question. Since the JVM must translate the bytecode into machine language, and since the machine language depends on the operating system being used, it is clear that the JVM is platform operating system dependent.
Unless you have a CPU that can directly execute Java bytecode there are such things you need to be able to interact with the OS for things like reading files, connecting to the network, displaying to the screen, etc The JVM must be platform dependent to allow your Java to run on the specific platform.
No, JVMs are not platform independent. In fact they are platform specific run time environment provided by the vendor. Although the byte code supports connection to multiple databases.. The output is always the same, ie music. But the input media ie. Hope i was able to solve your problem.. Because there needs to be some way to convert the platform-independent application's Java calls to calls that are compatible with the underlying OS.
JVM depends on operating system. For the code to be independent, something should be dependent and that is JVM. Which clearly implies that JVM is platform dependent.
I think that it could be platform independent if many different languages each one written in specific different platform where combined to make it change its own code dynamically. But all these take some great effort to happen and maybe destroy its portability. JVM translate the byte code which is universal to machine code which is machine dependent hence JVM is platform dependent.
Due to this byte code java is platform independent. JVM is platform dependent because it takes java byte code and generates byte code for the current operating system. So Java software is platform dependent but Java language is platform independent because different operating system have different JVMs. No, JVM is platform dependent. The code written in Java is not platform dependent. If you write Java code on a Windows operating system you can run that code on Linux or other operating Systems.
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. What is the reason that every system required has own JVM??
For more details plz search google thank you.. Didn't get the answer. Contact people of Talent-Core Java directly by clicking here. About Us. Talent Core Java Forum why jvm is platform dependent. Why JVM is platform dependent?? Omkar 16 May 11 Answers answer. Jvm is platform dependent because we have different JVM for different operating system. JVM provides the environment to execute the java file. So JVM is platform dependent.
Read More. View all vote's. No Vote. No Up Vote. No Down Vote. Because it converts the byte code into machine code means machine understandable code. Java virtual machine is responsible for converting bytecode into Machine readable code. Class file. So, in the end, it depends on your kernel.
0コメント