The document discusses Java byte codes and the Java Virtual Machine (JVM). It explains that the Java compiler produces intermediate byte code for the JVM rather than platform-specific machine code. The JVM then converts the byte code into machine language and executes it. Byte code acts as an intermediary between the virtual machine and the real machine, allowing Java programs to run on any system that supports the JVM. The document also briefly mentions discussing object-oriented programming concepts.
3. Recap
• What are the features of Java Applications and
Applets ?
3
4. Byte codes of Java, JVM
• All language compilers translate source code into
machine code for a specific computer
• Java compiler also does the same thing
• The Java compiler produces an intermediate code
known as ‘Byte code’ for a machine
4
5. Contd..
Byte codes of Java, JVM
• This machine is called the Java Virtual
Machine(JVM)
• JVM is a platform-independent execution
environment that converts Java byte code into
machine language and executes it
• It exists only inside the computer memory
• Fig 4.1. illustrates the process of compiling a Java
program into byte code
5
7. Contd..
Byte codes of Java, JVM
• Byte code is also known as virtual machine code
• The virtual machine code is not machine code
• The machine code is generated by the Java
interpreter
• Byte code acts as an intermediatery between the
virtual machine and the real machine as shown in
Fig. 4.2
7
8. Contd..
Byte codes of Java, JVM
Fig. 4.2 Byte code translation to machine code
8