Conversion of program source code to machine code is known as program compilation.
Source Code
The program written in High Level Languages such as Java, C, C++ etc. is known as source code.
Machine Code
The language of computer is machine language i.e., binary (0 and 1). The instructions in binary form are
machine code. It is the Low Level Language. The binary code of A is 01000001 and B is 01000010.
Ordinary Compilation Process
The compiler of Windows converts the source program directly to machine code for Windows only.
The compiler of System7.5 compiles to machine code for System7.5 only. The compiler of a particular system software
converts for that system software only.
Java Compilation Process
The Java Compiler compiles the source code into Java Byte Code, then this byte code is interpreted by Java Interpreter
into Machine Code for the platform used – if the operating system used is Windows then to the machine code for Windows,
and if the operating system used is System7.5 then to the machine code for System7.5.
Java Bytecode
Java bytecode is a machine instruction - an intermediate code which is converted from source
code by Java compiler. The Java bytecode is a machine-independent code.
Object Code / Machine Executable Code
The source code converted to machine code to a particular platform is machine executable code.
For different platforms, different machine codes are produced. The resultant machine code is known as
machine executable code or native executable code or object code.
Platform in General
The platform generally refers to combination of system software and hardware like Windows on Pentium IV or System7.5
on PowerMacs. Windows and System7.5 are system software, and Pentium IV and PowerMacs are hardware chips.
Java Virtual Machine (JVM)
The Java interpreter which is used to convert the Java bytecode into native machine executable code
is known as Java Virtual Machine (JVM). The JVM can be implemented in hardware form or software form.
Java API (Java Application Programming Interface)
The Java API is a library of compiled code (small built-in program parts) that can be used in our program
in order to reduce our program effort. The API includes library classes.
Java Platform
The Java Compiler and JVM combined with Java APIs (library classes) makes Java platform.
JDK (Java Development Kit)
The JDK is the Java Development Kit that contains Java compiler, Java Virtual Machine, Java API and other necessary
supporting programs etc. to develop a professional Java program.