web analytics

Process to compile and execute the java program…?

Process to compile and execute the java program

A process to compile and execute the java program:-

In JAVA there is some step to process and execute the java program.

A compilation is a process in which convert the program from a high-level language to machine level language.Java compilers include the Java Programming Language Compiler (javac). The content of each class contained in the source file is stored in a separate ‘.class’ file.

An object file can be directly loaded into computer memory and execute. The process of loading the object file and running the file is known as execution.


Develope a java program      (Test.java)

class Test
public static void main(String args[])
System.out.println(“Hello World”);



Compile the java program.

  1. a javac is a development tool of JDK which is responsible to compile java program in any environment.

javac filename.java
javac Test.java

      2. javac compiler generate .class file after successfully compile the .java file.

3. The .class file is the collection of bytecode.

4. Bytecode is known as the magic code in JAVA and this code can be executed by JVM(JAVA VIRTUAL MACHINE).


1. Execute the JAVA program.

2.JAVA is a JDK tool which is responsible to execute the class file with the help of JVM.

java class name
java Test


OUTPUT:“Hello World

Related Posts

Leave a Reply

Your email address will not be published.