Edit Compile and Run java code

Previous
Next

Edit, Compile and Run Java application:

  • OS controls all applications in the computer.
  • When we install JDK kit, Compiler and JVM will be installed into JDK folder.
    • javac à Java Compiler
    • java à JVM
  • Compiler compiles the code and generate .class file
  • JVM execute class file and generates output.

Java Code:

class Program 
{
	public static void main(String[] args) 
	{
		System.out.println("Hello World!");
	}
}

OS starts Compiler and JVM

The way of compile and run java program:

The following diagram explains how OS starts compiler and jvm:

Previous
Next

Add Comment

Courses Enquiry Form