Core Basic of Java – execution process of Java program

Java program   ⇒      Java  Compiler     ⇒  Class file    ⇒ Java Interpreter  ⇒    Output

            (Java file)                           (javac)                                                   (java)

There are 2 steps required to run any Java program. In the first step, Java compiler accepts Java file from the user and generate the class file from the given Java file. If the Java file contains any error than Java Compiler will show error message on the output screen, error message contains following information.

1.            File name

2.            Line number

3.            Error statement

4.            Suggestion

5.            Java statement with control marks

But after successful completion of compilation process compiler will generate class file and the generated class file is also know as Byte code/ Binary code / Magic code/Class file.

 In the second step, Java interpreter is used to generate output from the given class file, Java interpreter is commonly known as “Java” that accepts class file form the user and generates output as per the instruction given in the class file.

Leave a Reply

Your email address will not be published. Required fields are marked *