if Java is platform independent then its should run in all the machine without installing any specific software.But it requires to install JVM in all the OS why?Java in platform independent by means of its wonderful byte code conversion and Virtual CPU called JVM.Actually the compiled source code gives the instruction to the CPU to execute the set of programe.But In Java the compiled byte codes give the instruction to the virtual CPU instead of CPU. This Java compiled code gives the instruction to the JVM to execute the set of task.The JVM has installed in all the physical devices.
After the instruction given to Virtual CPU instead of CPU the java designer decided to give all the execution of task in the virtual CPU itself.The virtual CPU finally called as JVM.So if JVM present in the physical system then all the Java program take executed through the JVM. So all the platform dependent code into the JVM.This is totally differ from the Turbo C compiler the turbo c generate the platform dependent code and execute the task through the CPU.But in Java all the task execute through the Virtual CPU.
In Java all the platform dependent code has written in Java Virtual Machine.So finally JVM directly communicated to the CPU and execute the task which is know as platform independent.This means no matter which physical platform its running.But lot of way is there to break JVM and run platform independent. Java means portability but we can break the java code to act Java as a platform dependent
No comments:
Post a Comment