‹‹ Previous
Next ››
Java Bytecode
- Java compiler does not convert a java program into a executable form.
- Rather, Java compiler converts a java program into an intermediate form which is called Bytecode .
- Bytecode is a highly optimized set of instructions. It is executed by a software called Java Virtual Machine (JVM).
- Bytecode is interpreted by JVM.
- Converting a Java program into bytecode provides potability of a java program on internet. Because same bytecode can be executed by any JVM available on internet.
- Java virtual machine (JVM) is different from platform to platform. JVM is platform dependent. But any JVM is able to execute same bytecode generated by java compiler.
- JVM interpret bytecode (line by line execution). JVM does not compile the bytecode.
- Remember: java compiler compiles the java program and produce bytecode .
JVM interprets bytecode to execute java program.
Bytecode is highly optimized code. Therefore, it does not affect the performance of java program when it is interpreted by JVM for execution.
‹‹ Previous
Next ››