"Java Basics" JDK, JRE, JVM differences

Source: Internet
Author: User

Jre:java runtime Environment, Java Runtime Environment, JRE consists of Jvm,java runtime class library, dynamic link library and so on;

Jdk:java Development Toolkit,java Development Kit (includes compilers, debuggers, Javadoc, etc.) for developing and running Java programs;

Jvm:java virtual machine, Java VM, responsible for converting the bytecode generated by the compilation into a specific machine code line;

As part of the JRE, the JVM is a fictional computer that is implemented by simulating various computer functions on a real computer.
JVM has its own perfect hardware architecture, such as processor, stack, register, etc., also has the corresponding instruction system. The main task of the JVM is to interpret its own instruction set (that is, bytecode) and map it to the local CPU's instruction set or system call to the OS. The Java language is a cross-platform operation, in fact, different operating systems, using different JVM mapping rules, so that it is independent of the operating system, the completion of cross-platform. The JVM does not care about the upper Java source files, it only focuses on the class file generated by the source file.

The Java language uses a Java Virtual machine to mask information related to a specific platform, allowing the Java language compiler to generate only the target code (bytecode) that runs on a Java virtual machine, which can be run unmodified on multiple platforms. When a Java virtual machine executes a bytecode, it interprets the bytecode as a machine instruction execution on a specific platform. This is why Java can be "compiled once and run Everywhere".

Since development tools such as Eclipse,idea have their own built-in compilers instead of the compilers that come with the JDK's Bin directory, they only need the JRE at the time of installation, but Eclipse is just a platform, and maybe the other things you use (like maven) need JDK Or maybe;

Careful we may find that there is also a JRE in the JDK, usually called the private JRE, and the other one is called the public JRE. The private JRE is usually called internally by the JDK itself;

Specific reference: http://javaconceptoftheday.com/jdk-installation/

 is  This  from   is installed inside JDK folder (C:\Program Files (x86) \java\jdk1.  7 is used by the tools like Javac etc.

Refer to Oracle Website for more information: http://docs.oracle.com/javase/7/docs/webnotes/install/windows/jdk-installation-windows.html#private

Private Versus Public jreinstalling The JDK also installs aPrivateJRE and optionally a PublicCopy. ThePrivateJre isRequired to run the tools included with the JDK. It has no registry settings and iscontained entirelyinchA JRE directory (typically at C:\Program Files\jdk1.7.0\JRE) whose location isKnown only to the JDK. On the other hand, the PublicJRE can is used by other Java applications, isContained outside the JDK (typically at C:\Program Files\java\jre1.7.0), isRegistered with the Windows registry (at Hkey_local_machine\software\javasoft), can is removedusingAdd/remove Programs, might is registered with browsers, and might has the Java.exe file copied to the Windows system dire Ctory (which would make it thedefaultSystem Java platform).

Reference: Http://www.jianshu.com/p/f98c3acd8df8

http://www.iteye.com/topic/614163

Https://openhome.cc/Gossip/JavaEssence/WhichJRE.html

Http://www.cnblogs.com/PengLee/p/3970760.html

Http://www.jianshu.com/p/ebe7456e0aea

"Java Basics" JDK, JRE, JVM differences

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.