Java technical details of the Linux Tomcat series

Source: Internet
Author: User

Outline

First, what is Java

Ii. composition, version and language characteristics of Java

Iii. links and differences between the JRE and the JDK




First, what is Java

Java is a computer programming language, with cross-platform, object-oriented, generic programming features, widely used in enterprise-class Web application development and mobile application development.


James Goslin, who worked in the solar micro-system, developed the prototype of the Java language in the early 1990 and was initially named Oak, and the program language for small systems, such as household appliances, was used in the control and communication of household appliances such as televisions, telephones, alarm clocks, toasters, etc. Oracle abandoned the plan because the market demand for these smart appliances was not expected to be high. With the development of the Internet in the 1990 's, Sun saw the prospect of Oak's application on the internet, transforming Oak and formally releasing it in May 1995 with the name Java. With the rapid development of the Internet, Java has gradually become an important network programming language.


The Java programming language is very similar in style to the C + + language. Inherits the core of the C + + language Object-oriented technology, Java discarded the C + + language prone to error pointers, replaced by reference, while removing the original C + + and the original operator overload, but also remove the multiple inheritance features, instead of replacing the interface, add the garbage collector function. In the Java SE 1.5 release, generic programming, type-safe enumerations, variable length parameters, and auto-loading/unpacking features were introduced. The interpretation of the Java language by the solar micro-system is: "The Java programming language is a simple, object-oriented, distributed, explanatory, robust, secure and system-independent, portable, high-performance, multi-threaded and dynamic language"


Java differs from the general compilation language and literal translation language. It first compiles the source code into bytecode, and then relies on the virtual machines on various platforms to interpret the execution bytecode, thus achieving the cross-platform feature of "write once, run everywhere". In the early JVM, this reduced the efficiency of the Java program to some extent. However, after the release of j2se1.4.2, Java has significantly increased its speed.


Unlike traditional patterns, sun is introducing Java as an open technology. The world's millions of Java development companies are required to design Java software that must be compatible with each other. "The Java language relies on the power of the community rather than the power of the company" is one of Sun's slogan, and has been recognized by the vast number of software developers. This is completely different from the focus on the elite and the closed model advocated by Microsoft, and Microsoft later launched a competition. NET platform and the C # language that mimics Java. Later, Sun was acquired by Oracle, and Java became the product of Oracle Corporation.



Ii. composition, category and language characteristics of Java

Java architecture

    • Java programming language

    • Java class file format

    • Java API

    • Java VMS


Compile the source code in the Java language, compile it into a Java class file, then run the class file in the Java VM, and when you write the program, access the system resources by invoking the methods in the class (Java API), and when the program runs, It also satisfies the Java API Call of the program by invoking a method that implements the Java API in the class file. Java VMS and Java APIs form a "platform" in which all Java programs are compiled and run, so they are sometimes referred to as the Java Runtime environment.


The primary task of a Java VM is to load a class file and execute the bytecode within it. The Java VM contains a class loader, which can load class files from programs and APIs, while the Java API's classes are loaded only when they are needed in the execution of a program.


Java bytecode is executed by the execution engine. In different Java VMS, implementations of their execution engines may vary. The simplest execution engine is not a one-time explanation of bytecode, while another execution engine called an "instant compiler (Just-in-time compiler)" executes faster, but consumes more memory resources. In real-time compilation mode, the first byte code executed is compiled and cached for "reuse" by the machine code. The third execution engine is the so-called Adaptive Optimizer, in which the virtual machine interprets the bytecode, which is the activity that monitors the running program and records the most frequently used code. While the program is running, the virtual machine compiles only the code that is most frequently active, and the code that is not frequent is still reserved for bytecode execution by the virtual machine. The Adaptive optimizer allows the Java VM to execute the optimized native code in 80%-90% of the time, and only needs to compile 10%-20% code that has an impact on performance. The last virtual machine consists of a hardware chip, which executes Java bytecode in a local way, and its execution engine is embedded in the chip.


How the JVM is implemented

    • A one-time interpreter that interprets the bytecode and executes;

    • Instant compiler (Just-in-time complier): dependent on more memory cache interpretation results

    • Adaptive compilers: Cache about 20% code, improve the speed of about 80%;




Java can be divided into three categories, depending on the application domain.

    • Java Platform, Enterprise Edition (Java Ee:java Platform Corporate Edition)

    • Java Platform, Standard Edition (Java Se:java Platform Standards Edition)

    • Java Platform, Micro Edition (Java Me:java Platform mini version)


Features of the Java language

    • Object oriented

    • Platform-based

    • Automatic garbage collection


Iii. links and differences between the JRE and the JDK

Jre:java runtime Environment,java Run-time environment with only operating environment

Jdk:java Development Kit,java Development environment, contains the operating environment, that is, the JDK contains the JRE


A picture wins thousands of words, excerpt from Oracle's official website


650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M02/7A/29/wKioL1aks82i1c_oAABzx77voko321.jpg "title=" 1.jpg " alt= "Wkiol1aks82i1c_oaabzx77voko321.jpg"/>













This article is from the "Hello,linux" blog, make sure to keep this source http://soysauce93.blog.51cto.com/7589461/1738046

Linux Tomcat Series Java technology detailed

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.