You are on page 1of 5

How Java Program Executes

By
Rajanikanth B
www.btechsmartclass.com
Overview of total Process

• Create source code


• Generally it will be with .java extension. For example Sample.java

• Compile using ‘javac’ command


• It generates BYTECODE with .class extension (e.i. Sample.class)

• Execute using ‘java’ command


• It takes .class file & interprets into machine code by JVM. That machine code will be executed
on the OS.
Machine Code
Windows OS

JVM

va
ja
Machine Code
Source Code Compiler ByteCode UNIX OS
a
j av JVM
javac
jav
a
Machine Code
MAC OS
Sample.java Sample.class
JVM

jav
a
Machine Code
List of Errors
Mobile OS
…… JVM
How it is Organized

JDK javac, javap, jar, debugging tools, etc.,

JRE java, javaw, Libraries, rt.jar, etc.,

JVM
JIT Just In Time (Compiler)
Choosing Java
Next…. Development
Environment

You might also like