Original article from the official online English document of the Sun website Java novice programming center
About Java technology
Java is a programming language and a platform. .
Java programming language
Java language is a high-level language with the following main features:
Simple neutral architecture object-oriented portable (easy to transplant) distributed high-performance interpretation multi-thread robust dynamic security
For most development languages, you need to compile or explain a program to make it run on your computer. But Java languages and those who need to compile or explain look special. Through the compiler, you can first translate the program into a intermediate language called Java Bytecodes, a platform independent code that is interpreted on the Java platform. The interpreter explains all Java Bytecode instructions on the computer. Once compiled, the system has an interpretation process when the program is executed each time. Below this figure demonstrates the process:
You may use Java Bytecodes as a machine code instruction for the Java virtual machine. Each Java interpreter, whether it is a development tool or a web browser that runs the Applet applet, is the implementation of the Java virtual machine.
Java Bytecodes makes "one writing, run everywhere". This fashionable view is possible. And can compile the program to Bytecode on any platform running a Java virtual machine. Bytecodes can run in any Java virtual machine form. This means that as long as you have a Java virtual machine on your computer, the same Java program can run on a Windows 2000 system, Solaris workstation, or a MAC system.
Java platform
One platform is a hardware or software environment that makes the program. We have just mentioned some popular platforms such as Windows 2000, Linux, Solaris and MacOS. Most platforms can be considered as a consortium of hardware and operating systems. Java and other platforms are different because it is just a software platform running on other hardware platforms.
. There are two components of the Java platform:
Java Virtual Machine (Java VM) Java Application Interface (Java API)
I have already introduced the Java virtual machine, it is the basis of a Java platform, based on the hardware platform.
Java API is some collection of program components that have been prepared, which provides some useful features, such as a graphical user interface (GUI) container. Java API is some libraries consisting of related classes and interfaces, which are called packets. The next chapter "What can Java technology?" Will focus on some of these Java API packages.
Below this vice sketch, a program running on the Java platform. As shown, Java APIs and virtual machines isolate the program and hardware platform.
The compiled code is called a local code, and the compiled code is running on a specific hardware platform, such as Windows local code. Since the platform is independent, the Java platform is slower than those who run the local code. However, if the Java platform has an efficient compiler, a harmonious and stable interpreter, and a fast timely Bytecode compiler, then the performance of the Java platform can be different from the performance of the local code platform, without threatening Java. Portability.
Translated by Willpower, 2003.11.14