Chapter 2       

Compilation and Execution of a Java Program


Java Language uses only one compiler javac.exe for all platforms.
After compilation of a java program every class in source code will convert into individual Byte code.
A Byte code can be execute on any operating system with help of Java Virtual Machine (JVM).
JVM consists an Interpreter (which is  Just-in-time compiler) can can convert Byte code into operating system readable form.
JVM differs fro compiler to compiler.
Java Developer Kit (Jdk) contains tools needed to develop the java program like compiler (javac.exe), Application Launcher (java.exe), etc.
Java Runtime Environment (Jre) contains JVM and Java package Classes (Java library).
Code for compilation a java program on command prompt :
javac FileName.java
Code for execution of java program on command prompt :
java FileName

Comments

Popular posts from this blog