Introduction to Sun Java platform

Source: Internet
Author: User
The original Article is from the official online English documentation of Sun website. Java newbie programming center about Java Technology

Java is a programming language and a platform ..

Java programming language

Java is a high-level language with the following features ::

  • Simple
  • Neutral Architecture
  • Object-oriented
  • Portable (portable)
  • Distributed
  • High Performance
  • Interpreted type
  • Multithreading
  • Robust
  • Dynamic
  • Security
  • For most development languages, you need to compile or interpret a program to make it run on a computer. However, the Java language is special compared with those that require compilation or interpretation. Through the compiler, the program can first be translated intoJava bytecodes intermediate language,Independent platform code interpreted by the interpreter on the Java platform. The interpreter is used to explain all the Java bytecode commands on the computer. Once the compilation is completed, the system returns an interpretation process every time the program is executed. The following figure shows the process:

    You may regard Java bytecodes as a machine code instruction of the Java Virtual Machine. Each Java interpreter, whether it is a development tool or a Web browser that runs the applet, is a Java Virtual Machine implementation form.

    Java bytecodes makes it possible to use this trendy idea of "writing once and running anywhere" and compile the program into bytecode on any platform that runs a Java virtual machine. Bytecodes can run on any Java virtual machine. this means that as long as your computer is installed with a Java virtual machine, the same Java program can run on Windows 2000, Solaris workstation, or a MAC system.

    Java platform

    A platform is a hardware or software environment for running programs. We have mentioned some popular platforms, such as Windows 2000, Linux, Solaris, and MACOs. Most platforms can be considered as a combination of hardware and operating systems. Java is different from other platforms because it is only a software platform running on other hardware platforms.

    . The Java platform has two components:

    • Java VM)
    • Java application interface (Java API)

    I have already introduced the Java Virtual Machine. It is the foundation of a Java platform and is based on a hardware platform.

    Java APIs are a collection of program components that have been compiled. They provide some useful functions, such as the sample user interface (GUI) container. Java APIs are libraries composed of related classes and interfaces. These libraries are called packages. In the next section, "what can Java do ?" Some functions and attributes of these Java API packages will be highlighted.

    The following figure illustrates a program running on the Java platform. Java APIs and virtual machines isolate programs from hardware platforms.

    The compiled code is called local code. The compiled code runs on a specific hardware platform, such as Windows Local Code. Because the platform is independent, the Java platform is slower than those running local code. However, if the Java platform has an efficient compiler, a harmonious and stable interpreter, and a swift and timely bytecode compiler, the performance of the Java platform and the performance of running the local code platform are almost the same, it does not threaten Java's portability.

    Translated by willpower, 2003.11.14

    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.