Execution process of Java program

To create an application in Java, you need to know how to write and run Java programs.

In order to execute a program in Java, a coding process is first required to write a source file to be requested to the computer. After you write your code, you need a compiler that interprets the code and when compiling is complete, you need an interpreter that reads and executes the compiled code one by one.

The JDK is the tool for this coding, compiling, and interpreting. JDK can be installed free of charge by installing an integrated environment called JAVA SE provided by Oracle or installing OpenJDK.

The process of writing and executing the Java source code is summarized as follows.

  • Write the Java source code.
  • Compile the source code by executing the javac command in the command window. The javac command creates an intermediate code that is independent of the operating system, called a class file.
  • When you execute the java command, the Java VM interprets and processes the code written in the class file. The Java VM is prepared for each OS, such as for Windows or Linux, and the VM installed in that OS performs the actual processing according to the OS used. That is, there is a difference in the internal processing of each OS.
Execution process of Java program

Share This Post

댓글 남기기

이메일은 공개되지 않습니다. 필수 입력창은 * 로 표시되어 있습니다

Latest Post