"In-depth understanding of Java Virtual Machine" Reading notes-the 1th chapter approaching Java

Source: Internet
Author: User
Tags java se

(Note: Please see "in-depth understanding of Java Virtual Machine" Zhou Zhiming, the knowledge point part of the reference Baidu Encyclopedia)

General statement

The 1th chapter is divided into two parts: a Java overview and a tutorial to build your own JDK.

1 Java Overview

This paper introduces the overall characteristics of Java, the technical system composition of Java, the history of Java and JVM.

1.1 General features of Java

1) Java is not only a programming language, but also consists of a series of computer software and specifications of the technical system.

2) Java has many advantages:

The A.java virtual machine establishes a unified running platform on the different physics machines, and realizes the cross-platform. Main

B. Provides a relatively secure memory management and access mechanism that avoids the vast majority of memory leaks and pointer out-of-bounds issues.

C. Hot spot code detection and run-time compilation and optimization enable Java applications to achieve higher performance as uptime increases.

D. Comprehensive application interfaces and support for a large number of third-party class libraries

3) Java Current Short board: (As of JDK1.7)

A.java does not yet support modularity, mainly due to the fact that Sun's proposed JSR was not passed, but a project called Jigsaw was established in openjdk to push Sun's proposed JSR standards into concrete implementations in the Java platform. In addition, IBM has proposed its own Java platform Modular standard Jsr-291:java SE dynamic component support (actually OSGi R4.1).

B. An important advantage of functional programming is the ability to naturally adapt to parallel operations. Functional programming is now possible in Java, but it can lead to bloated code, and in Java 8, LAMDA support will be provided to improve support for functional programming.

C.java Virtual machines support 64-bit systems very early, but Java programs run on 64-bit virtual machines with a significant additional cost: more memory is required due to pointer bloat and a variety of data types for their fillers, and typically more 10%~30% memory consumption than 32-bit systems , with a 32-bit virtual machine running at full speed, about 15% performance gaps. For this purpose, Sun provides pointer compression, but turning on pointer compression increases the number of code execution.

1.2 Java Technology System composition

Sun's defined Java technology architecture includes the following sections:

1) Java programming language

2) JVM

3) class file format

4) Java API class Library

5) Third-party Java class Library

The JDK (Java development Kit, the smallest environment to support Java program development) includes: Java programming language, JVM, Java API Class library.

The JRE (Java Runtime Environment, a standard environment that supports Java programs to run) includes the Java programming language, the JVM, and the Java SE API subset.

JDK 1.8

By technical field can be divided into 4 platforms:

1) Java Card: Provides support for running Java applets (Applets) on small memory devices such as smart cards.

2) Java ME (Micro Edition): Mobile terminal (mobile phone, PAD). The Java API has been streamlined and has been added to mobile-side support.

3) Java SE (Standard Edition): desktop-level applications. Provides a complete Java Core API.

4) Java EE (enterpeise Edition): Enterprise-class applications (such as ERP (Enterprise Resource Planning), CRM (Customer relationship Management) applications. In addition to providing the Java SE API, it has been extensively expanded and provided with relevant deployment support.

2 other points of knowledge:

1) class file: Full name Java class file. Programs written in traditional languages such as C + + are typically compiled first, then connected to a separate binary file that specifically supports specific hardware platforms and operating systems, and typically binary executables on one platform do not run on other platforms, mainly because this binary contains the machine language for the target processor. The Java compiler translates the instructions from the Java source file into bytecode, which is the "machine language" of the Java Virtual machine, and unlike the normal program, the Java program (class file) is not a local executable program. When running a Java program, the JVM (the Java Virtual machine) is run first, and then the Java class is loaded into the JVM, and the part that loads the Java class is called Class Loader.

2) The JVM works together with compilers and interpreters to achieve efficient purposes.

The relationship and difference between the compiler and the interpreter: both the interpreter and the compiler perform lexical analysis, parsing, and semantic analysis, and then they begin to differ. The interpreter chooses to execute the statement directly after the semantic analysis, and the compiler chooses to store the semantics in an intermediate language after the semantic analysis, and then translates it into different machine languages (executable program) by different backend.

Links and differences between compilers and interpreters see: http://www.cnblogs.com/sword03/archive/2010/06/27/1766147.html

"In-depth understanding of Java Virtual Machine" Reading notes-the 1th chapter approaching Java

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.