1. What is a Java platform?
Currently, there are many operating platforms in the computer world, including Windows, Macintosh, OS/2, Unix, and NetWare, the software must be compiled and run separately on each platform. The binary file of an application running on one platform cannot run on another platform because the binary file is encoded on a special machine.
Java platform is a new type of software platform that can be used to publish and run highly interactive, dynamic, and secure Java applets and applications in network computer systems ). However, another advantage of the Java platform over other operating product platforms is that it is located on top of them and compiled applications into bytecode. This encoding mechanism is not specific to any machine encoding, instead, machine instruction sets are generated for a so-called Java virtual machine. Programs Written in Java can be compiled into bytecode files that can be run on any underlying operating system with the Java platform. That is to say, the same compilation file can run on any operating system running the Java platform. Because the core of the Java platform is the Java Virtual Machine mechanism, This portability becomes possible.
Although each underlying platform has its own implementation method for Java virtual machines, there is only one specification for Java virtual machines. Because of this, the Java platform can provide a standard and unified programming interface for applets and applications running on any hardware. Therefore, the Java platform is an ideal solution for the Internet. On the Internet, a program should be able to run on any computer in the world. The Java platform is designed to provide the ability to "compile once and Run anywhere" ("write once, Run anywhere ").
Developers use the Java language to compile powerful Java application source code. They compile on the Java platform instead of in the underlying system. Java source code is compiled into an intermediate, portable bytecode form, and then can run in any place with the Java platform.
Developers can use Java to write object-oriented, multi-threaded, and dynamically linked applications. The Java platform has built-in security, violation handling, and automatic garbage collection mechanisms. When you convert Java bytecode into a machine language, the runtime compiler can speed up the operation. For faster speed or other special features, developers can also write in Java or call local methods outside of Java-written in C, C ++, or other languages, compile the method in a special underlying operating system.
Java is a channel to enter the Java platform. Programs Written and compiled in Java can run on the Java platform.
The Java platform has two basic components:
? Java Virtual Machine
? Java application interface (Java API)
They will be detailed in subsequent chapters. The combination of these two parts provides a runtime environment for end users to develop Internet and Intranet applications.
Ii. Basic Java platform
The basic Java platform is a micro-platform for developers to secure applications. It is currently used to run high-performance Java applets and applications. This platform is used for network computers, desktops, and workstations (the platform described in the next section for smaller systems ). It contains the same Java Virtual Machine as previously mentioned, but has a basic Java Applet applets and applications (applications) required small Java API (application interface ). As we all know, this small API is a Java applet API or a basic JAVA application API. Developers who Code on the basis of this small set of APIs can rest assured that the programs developed on this basis can also run anywhere, without the support of other additional class libraries.
Specific persons with Java platform operation permits have agreed to include basic Java APIs in their personal Java platform application implementations. With the development of more Java class libraries, the basic Java platform will continue to grow. These added class libraries will be added to the Basic Java platform in a timely manner, and displayed on the operating system of each licensed user.
In addition, a set of application interfaces (APIs) called standard extended APIs are developed by vodoft and other major companies leading the industry to expand the basic functions of the platform. As time passes, some standard extended API supplements will be added to the Java basic platform.
3. embedded Java platform
The goal of the embedded Java platform is to target some consumer devices, such as purchase devices, printers, photocopiers, and mobile phones, which require less resources and more personalized features than those of network computers. These devices have limitations such as low storage space, no display screen, or inability to connect to the network.
The application interface (API) for this platform is called the Java Embedded API, which is the smallest set of Java APIs and can be used and run on embedded devices with few features. As this platform is still under development, this API has not yet reached a standard level. Therefore, this API has not been developed yet, but in general it may be composed of java. lang and java. util packages. A Java application written for a special device can run on most similar dedicated devices.
Iv. Benefits of the Java platform
The Java platform is beneficial to end users and developers. The support staff are as follows:
Benefits of end users
Currently, the Java platform is connected through runtime software to provide vivid and interactive content on the global network. Java applications can be run immediately in all operating systems. On this basis, the user has been freed from the work of having to select an operating system. Smaller and cheaper dedicated systems will eventually have their own applications.
Benefits of developers
The Java language is a small, easy-to-learn language system with a more comprehensive set of APIs. Developers can "compile once and run anywhere", which gives Java a huge market advantage over other languages. In addition, the Java Development Environment on all operating systems only compiles files into a single binary format. Now, developers can develop, save, and publish on the same platform, and then run on all platforms without having to develop on multiple platforms, and then released on each platform. Java's ability to "compile once and run anywhere" provides some developers with ample reasons for turning Java into a replacement for C or C ++, it is used for independent, non-network applications.
Moreover, building applications through distributed and reusable structures allows developers to focus on new things, greatly reducing development costs. Developers can perform distributed development through the network without having to complete the work in a compartment dedicated to software development.
5. Internal exploration of the Java platform
The Java platform consists of the Java Virtual Machine and Java APIs, as shown in Figure 2:
? Java Virtual Machine-Java virtual machine is a "soft" computer that can be implemented on software or hardware. It is an abstract machine designed to process Java programs before an existing processor. The port of the interface and the adapter can be easily connected to the new operating system without the need to re-compile it completely.
? Java API-Java API provides standard interfaces for Applets and applications, regardless of the operating system on which they run. Java API is the basic framework of the application development environment. The API specifies a set of basic interfaces that developers will use to program Java applications in an increasing number of main fields.
-- Java basic APIs provide basic languages, applications, I/O, networks, guis, and Applets services; OS companies that have licensed Java have agreed to include the above features wherever they deploy the Java platform.
-- Java standard extended API extends some Java functions beyond the basic API. Some of these extensions will eventually be integrated into the basic Java API. Some other non-standard extensions of APIs can be provided by Applets, applications, or underlying operating systems. With the release of each new extended API specification, the entire industry will validate it and give feedback before it is finalized.
In, the basic Java platform is black, including those identified by the Adapter. Java APIs include basic Java APIs and standard Java APIs. Class is the implementation of the API. Java virtual machine is the core of the entire platform. The port of the interface is located between the Java Virtual Machine and the operating system or the browser. The port of the interface has two parts, one of which is independent of the Platform (as shown in the black part); the other is dependent on the platform, as shown in the adapter. The operating system and Java operating system provide window, document, and network functions. Different machines can be connected through networks, as shown in.
The Java API framework is open and scalable. The specifications of each interface are jointly developed by experts from the entire industry in each field. The new specifications will be publicly released and verified for the whole industry. API specifications can be implemented by the same oft and other companies in the industry. In today's rapid development environment, the Java API framework allows