<title>The cross-platform principle of Java</title> The cross-platform principle of Java
Java is an easy-to-use, fully object-oriented, platform-agnostic, secure, and primarily Internet-facing development tool. Since the advent of Java in 1995, its rapid development has transformed the entire web world. With the advent of Java servlet, Java is emerging in e-commerce, with the introduction of the latest Java Server Page (JSP) technology, which makes Java a preferred development tool for Web-based applications.
Java is the first language that allows a consumer to transfer an application over the Internet from a remote server to a local machine and execute it: An application provider does not need to know the language of the consumer's computer hardware and software environment.
The impact of Java on Internet programming is just like the C language's impact on system programming.
A Java Virtual machine (JVM) is an imaginary computer that can run Java bytecode, and the cross-platform nature of Java is relative to other programming languages.
As with C language programming, we will first write the Java source program, and then the Java compiler will compile the Java source program into the JVM executable code, namely Java bytecode. The Java source program generates a bytecode file that is equivalent to the EXE file on the compiled windows of the C source program, and runs Java bytecode files on the JVM, which is the file with the extension. class.
The process for Windows to execute an EXE executable is to remove a computer instruction from the EXE file and give it to the CPU to interpret the execution. The JVM executes the Java bytecode file, and the JVM virtual machine takes the bytecode instructions from the Java bytecode file to the "CPU" to execute the code. Hardware and software can be converted to each other, the bytecode of the "CPU" can be hardware, or a system running on a software, this software is called the Java bytecode interpreter (that is, Java Virtual machine).
Thus, as long as the interpreter program under a specific platform is implemented, Java bytecode can be run through the interpreter program on the platform, which is the root of the Java cross-platform. Currently, the Java Interpreter program is not available on all platforms, which is why Java is not running on all platforms, it can only run under a platform that has implemented the Java interpreter program.
The cross-platform principle of Java