Differences between JDK, JRE, and JVM and jdkjrejvm

Source: Internet
Author: User

Differences between JDK, JRE, and JVM and jdkjrejvm

In lua, the development of cocos-2d, the need to use java Dongdong, the connection between these Dongdong is often not very clear, so sorted down...

The relationship among JDK, JRE, and JVM is good:


JDK

Java Development Kit (JDK) is a Java software Development Kit (SDK ). As a Java SDK,General users do not need to install JDK to run Java programs, but only need to install JRE (Java Runtime Environment ). The program developer must install JDK to compile and debug the program.

  • SE (J2SE), Standard edition,Standard EditionIs a common version. It is renamed Java SE from JDK 5.0.
  • EE (J2EE), Enterprise edition,Enterprise EditionTo use this JDK to develop a J2EE application, which is changed from JDK 5.0 to Java EE.
  • ME (J2EE), Micro edition, mainly usedMobile DevicesJava applications on embedded devices, changed from JDK 5.0 to Java ME.

Without JDK, you cannot compile Java programs. To run only Java programs, make sure that the corresponding JRE has been installed.. JDK contains a number of components for Java development, including:

  • Javac-compiler: Compile the source code with the suffix. java into the bytecode with the suffix. class.
  • Java-run the tool to run the. class bytecode
  • Jar-packaging tool to package related class files into one file
  • Javadoc-document builder, which extracts documents from source code comments. The comments must comply with the specifications.
  • Jdb debugger, debugging tool
  • Jps-display the progress status of the current java program running
  • Javap-decompilation Program
  • Appletviewer-tools used to run and debug the applet without using a browser
  • Javah-generate the C header file and C source file from the Java class. These files provide connection gluing for Java and C code interaction.
  • Javaws-run the JNLP Program
  • Extcheck-a tool used to detect jar package conflicts
  • Apt-annotation processing tool
  • Jhat-java heap analysis tool
  • Jstack-stack tracing program
  • Jstat-JVM detection statistics Tool
  • Jstatd-jstat daemon
  • Jinfo-get the java program configuration information that is running or crashed
  • Jmap-Get java Process Memory ing information
  • Idlj-IDL-to-Java compiler. Convert the IDL Language to a java File
  • Policytool-a GUI policy file creation and management tool
  • Jrunscript-run the command line script

JDK also includes the complete JRE (Java Runtime Environment) and Java runtime Environment, also known as private Runtime. Including a variety of library classes for the product environment, such as the basic class library rt. jar, and complementary libraries for developers, such as international and localized class libraries and IDL libraries. JDK also contains various sample programs to demonstrate various parts of Java APIs.

JRE

JRE: Java Runtime Enviromental (java Runtime Environment).That is to say, on the JAVA platform, all Java programs must be running under JRE.. Including JVM and JAVA core class libraries and supporting files.Compared with JDK, it does not include development tools-compilers, debuggers, and other tools.. JavaRuntimeEnvironment (JRE) is a Java platform on which applications can be run, tested, and transmitted. It includes Java Virtual Machine (jvm), Java core class library, and support files. It does not contain development tools (JDK)-compilers, debuggers, and other tools.JRE needs the auxiliary software -- Java Plug-in -- to run the applet in the browser.The Java Plug-in software allows Java applets and JavaBean components to run in the browser that uses Sun's Java Runtime Environment (JRE), rather than in the browser that uses the default Java Runtime Environment. Java Plug-in can be used for Netscape Navigator and Microsoft Internet Explorer.

J2RE is the Java2 Runtime Environment, that is, the Java Runtime Environment. It only emphasizes that it matches the Java2 Platform, sometimes referred to as JRE.If you only need to run a Java program or Applet, download and install it. If you want to develop Java software on your own, download JDK (the difference between JRE and JDK ).JRE is included in JDK. Note: because Microsoft does not fully support Java, do not use the virtual machine that comes with IE to run the Applet. Be sure to install a JRE or JDK.

JVM

Java Virtual Machine (JVM), Also known as Java virtual machine,A virtual machine that can run Java bytecode and operate with a stack-structured Machine. The first implementation version was first developed and implemented by Sun Microsystems. It is part of the Java platform and can run software programs written in Java.

The Java Virtual Machine has its own complete hardware architecture, such as the processor, stack, and register, as well as corresponding command systems. JVM shields information related to the specific operating system platform, so that Java programs onlyYou can run the target code (bytecode) on multiple platforms without modification. By implementing the software implementation performed by the central processor (CPU), the compiled Java program code (Applet and Application) can be executed).

As a virtual machine of a programming language, it is not only dedicated to Java, as long as the generated compilation file meets the JVM's requirements for loading the compilation file format, any language can be compiled and run by JVM. Except for Oracle, there are other open-source or closed-source implementations.

Java code running process

The actual situation we developed is: after we developed our own JAVA program using JDK (calling java api), we passed the javac) compile our text java file into JAVA bytecode and run these JAVA bytecode on JRE. The JVM parses these bytecode and maps it to the CPU instruction set or OS system call.

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.