Java Cross-platform principle

Source: Internet
Author: User

    • Summarize 1:java Running Process
      1. The Java program runs in two steps: Compiling and Interpreting execution
      2. Compile Java source program into Java bytecode file (. Class) via "compiler" (bytecode file in a structurally neutral intermediate file format)
      3. Java bytecode files are interpreted as corresponding machine languages and executed using different "virtual machines"

      

    • Summarize the differences between 2:java cross-platform and C-platform

      1. Java: Compile once, run everywhere, C: Compile multiple times, run everywhere
      2. In the Internet situation, the platform is different, Java cross-platform more advantages

      3. Can Java span all platforms: to see if a virtual machine is available and installed

      4. Java runs fast without C language

      5. Java needs to interpret the class file as machine code and execute it, C executes the machine code

    • Summary 3: Byte-code files bytecode
      1. . class file Binaries

      2. Format-neutral, platform-independent binary files

      3. is the product of the compilation, is the raw material of explanation

    • Summary 4:java virtual machine JVM

      1. JVM is the abbreviation for Java Virtual machine (Java VM)

      2. The JVM is a specification for computing devices, a fictional computer that is implemented by simulating various computer functions on a real computer.

      3. The JVM is a virtual computer that executes bytecodes bytecode.

      4. Java Virtual machine is the core technology of Java, and also the foundation of cross-platform.

      5. 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.

      6. When a Java virtual machine executes a bytecode, it interprets the bytecode as a machine instruction execution on a specific platform. That's why Java can be "compiled once, run everywhere."

    • Summarize the differences between 5:JDK, JRE, and JVM

Jdk:
Java Development Kit
Products for Java Developers
Jre:
Java Runtime Environment
Is the set of environments necessary to run a Java program
Jvm
Java Virtual Machine
Explain running Java bytecode files, cross-platform core

Contact: JDK contains jre,jre containing JVM.

          

Java Cross-platform principle

Related Article

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.