Beginner's word No4 (Java command, JVM)

field -Variable name declared in the class -A unit that resists records. (Other meaning fields / areas, etc.)

java command

A command to launch a Java application. (Run a Java program)

Command options

option Overview
-classpath Where to search for related class files
--module-path Where to search for modules
-jar Run the jar file
-version Show Java version

** Example: An example of running Test.jar. Set "Taro" as a parameter. ** ** >> java -jar Test.jar ** "Taro" **

JVM(Java Vitual Machine) Software for running Java programs. In other words, "Java virtual machine" and "Java VM"

Java is a language created with the idea that Java runs on any machine.

How the JVM works

① Java program ⇒ ② JVM ⇒ ③ OS Interpret ①, convert it to a code that can be executed by the OS of ③, and operate it. (2) JVM is indispensable to run programs written in Java without depending on the platform.

Convert text code to binary code (machine language) from ① to ② Read the binary code from ② to ③ and convert it to native code

JVM configuration

There are roughly three areas.

  1. New area
  2. Old area
  3. Permanent area There is. Heap in areas 1 and 2. Area 3 is a non-heap area.

heap

A memory area used by a system such as an OS or application.

    1. New area ⇒It is further classified into three areas. ⇒ Placed in the Eden area when the object is instantiated ⇒ When the memory of Eden becomes full, it is stored in the From area and To area to save the object.
  1. Old area ⇒ Information that has been used for a long time is managed by the object stored in the New area. ⇒ When the Old is full, a process called Full GC frequently occurs.
    1. Permanent area ⇒ Information such as classes and methods is stored. [Supplement] GC stands for Garbage Collection. ⇒ Organize the used memory area in the memory area and create a free area

Recommended Posts

Beginner's word No4 (Java command, JVM)
[Java] JVM configuration
[Java] Problem No. 2
[Java] Problem No.3
[Java] Problem No.1
java jar classpath command
Merge Java Word documents
Introduction to java command
Java Lambda Command Pattern
Java reserved word summary
[Java] Beginner's understanding of Servlet-②
Java debug execution [for Java beginners]
[Java] Basic statement for beginners
[Java] Beginner's understanding of Servlet-①
Object-oriented summary by beginners (Java)
Java for beginners, data hiding
Java beginners read Hello World
Java creates a Word document
Java application for beginners: stream
Java 9 no longer needs add-apt-repository