Differences and connections between JDK, JRE, and JVM

Source: Internet
Author: User

Many friends may be like me, have been using Java development for a long time, but the JDK,JRE,JVM of these three links and differences, has always been vague.

Today's close-up of this article, to organize the next three relations.

Jdk:java Development ToolKit (Java Developer Toolkit). The JDK is the core of the entire Java system, including the Java Runtime Environment (Java Runtime envirnment), a stack of Java tools (Javac/java/jdb, and so on) and a Java-based class library (that is, the Java API includes Rt.jar).

The most mainstream JDK is the JDK that Sun releases, in addition to sun, many companies and organizations have developed their own JDK, for example, foreign IBM developed its own JDK, Taobao also developed its own JDK, Organizations develop their own JDK in some ways to get some improvement to suit their needs, such as the IBM JDK is said to run more efficiently than the sun's JDK. But anyway, we still need to get the basic sun jdk right.

The JDK has the following three versions:

J2se,standard Edition, Standard Edition, is our usual version j2ee,enterpsise edtion, Enterprise Edition, uses this JDK to develop Java EE application J2me,micro edtion, mainly for mobile devices, Java applications on embedded devices

We often use JDK to refer to Java Api,java API is Java application interface, in fact, the predecessors have written some Java Class, including some important language structure and basic graphics, network and file I/O, and so on, we in our own program, Invoke these classes written by our predecessors as a basis for our own development. There are, of course, a growing number of better or more powerful third-party libraries for us to use now.

Jre:java Runtime enviromental (Java Runtime Environment). This is what we call the Java platform, all Java programs must be under the JRE to run. Includes JVM and Java core class libraries and support files. It does not contain development tools-compilers, debuggers, and other tools-compared to JDK.

Jvm:java virtual mechinal (Java vm). The JVM is part of the JRE, a fictitious computer that is implemented by simulating various computer functions on a real computer. The JVM has its own perfect hardware architecture, such as processor, stack, register and so on, also has the corresponding instruction system. The main work of the JVM is to interpret its own instruction set (that is, bytecode) and map it to the local CPU's instruction set or the OS's system call. The Java language is run across platforms and is actually a different operating system that uses different JVM mapping rules to be independent of the operating system and completes Cross-platform. The JVM does not care about the top-level Java source file, it is concerned only with the class file generated by the source file (class files). The composition of the class file includes the JVM instruction set, the symbol table, and some subsidy information.

The following diagram is a good surface of the relationship between the three JDK,JRE,JVM:

We developed the fact that we used the JDK (Invoke Java API) to develop our own Java program, compile our text Java files into Java bytecode via the JDK compiler (JAVAC), and run these Java bytecode on the JRE, The JVM resolves these bytecode, mapping to a CPU instruction set or system call to the OS.

Back to the column page: http://www.bianceng.cnhttp://www.bianceng.cn/Programming/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.