HotSpot VM Runtime

Source: Internet
Author: User

The Hotspot VM Runtime system provides services and common APIs for the hotspot JIT compiler and garbage collector, as well as basic features such as boot , thread management ,JNI (Java Local interface) for VMS. the HotSpot VM Runtime Environment assumes many responsibilities, as follows:

1. Command line Options

The hotspot VM is configured with command-line options, which is equivalent to the profile of the hotspot VM, mainly including which JIT compiler to choose, what garbage collector, the size of the Java heap, and so on. There are 3 main types of command-line options:

1.1. Standard option

The standard option is a Java Virtual machine specification option that requires all Java VMS to be implemented, and they remain stable between distributions, but may also be revoked in subsequent releases.

1.2. Non-standard options (nonstandard option)

Non-standard options (prefixed with-X) do not guarantee or enforce that all JVM implementations must be supported, and it may change between the Java SDK distributions without notification.

1.3. Unstable options (Developer option)

The non-stable option typically corrects the operation of the JVM for specific needs and may require access to the system configuration parameters. As with non-standard options, non-stable options may change between distributions without notice.

2. VM Life cycle

The hotspot VM Runtime System is responsible for starting and stopping hotspot VMs. Launch the component launcher for the hotspot VM. A HotSpot VM has several initiators. The most common unix/linux on the java,windows are Java and JAVAW. The embedded JVM can also be started via the Jnt Interface (JNI_CREATEJAVAVM), and there is a network initiator javaws (Java Web start).

The initiator performs a series of actions when it launches the Hotspot VM. The steps are outlined below:

(1) parsing command-line options

(2) set the heap size and JIT compiler

If the command line does not explicitly set the heap size and JIT compiler, the initiator is set by automatic optimization.

(3) setting environment variables such as: Ld_library_path and Classpath

(4) if the command line has the-jar option, the initiator looks for main-class from the manifest of the specified jar, otherwise reads from the command line Main-class

(5) using the standard Java local interface (Java Native interface,jni) method JNI_CREATEJAVAVM Create a hotspot VM in a newly created thread

(6) once the Hotspot VM is created and initialized, the Java Main-class will be loaded and the initiator will also get the Java Main method parameters from Java Main-class

(7) TheHotSpot VM calls the Java Main method Callstartvoidmethod with the Jni method and passes the command-line option to it

HotSpot VM Runtime

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.