This video will help you in understanding why java is platform independent. In the previous video i have told you that that java is platform independent i.i. we can run a java program on any machine .it works on execute once and run anywhere concept. A Java program can run on any machine having a jre.
JRE stands for java run time environment. By default jre is present in allmost every computer .whenever we excute a program in c/c+ the on compilation it is converted into machine code which is machine dependent. but the same dos not happen with java
whenever we execute a program it first gets converted into bytecode or intermediate code. his bytecode is 80% machine code and 20% source code . now when we run the program then this bytecode is converted into machine code .
Jre provides us a virtual machine which is known as JAVA VIRTUAL MACHINE .whenevr we execute a java program then on compilation that program is first converted into machine code of jvm .this machine code of jvm is 80% machine code and 20% source code . when we run the program the program hen this bytecode of jvm is executed .
thus we can say java is two stage language.
first step is compilation and second step is execution
Nesta página do site você pode assistir ao vídeo on-line JAVA Virtual Machine And JAVA Run Time Environment Tutorial duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Java Dukes 09 Julho 2014, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 6,625 vezes e gostou 38 espectadores. Boa visualização!