Reference:
1 http://www.cnblogs.com/bluestorm/archive/2012/12/09/2810167.html Differences
2 http://blog.jobbole.com/53152/Compilation process
3 http://jingyan.baidu.com/article/b24f6c82de6bcf86bfe5dad4.html Java process from compilation to execution (full)
Java compilation-Download-explain-the process of execution:
In Java programming, source code is the origin. is the source program file that we have written according to the Java language Specification, with the extension java.
Byte code is called bytecode, which is the class file generated by the Java compiler for the source program file with the extension Java, and it has the name extension class.
The bytecode file is not a binary file; The bytecode file interprets execution in the Java virtual machine through the Java interpreter.
Java programs run roughly the same way: The concept of virtual machines is introduced in Java, where an abstract virtual machine is added between the machine and the compiler program. This virtual machine provides a common interface to the compiler on any platform. The compiler only needs to target the virtual machine, generate code that the virtual machine can understand, and then be executed by the interpreter to convert the virtual machine code to the machine code of the particular system. In Java, this code for the virtual machine is called bytecode (bytecode), which is not targeted at any particular processor, but only for virtual machines. The interpreter for each platform is different, but the virtual machines that are implemented are the same. The Java source program is compiled by the compiler into bytecode, the bytecode is interpreted by the virtual machine, the virtual machine sends each byte code to be executed to the interpreter, the interpreter translates it into machine code on a particular machine, and then runs on a particular machine.
A few main questions:
1, Java compilation generated bytecode, in all operating systems are the same, so it has this feature: Write once, run anywhere. It means that it can be run in any environment with just one encoding.
2, different operating systems, their Java Virtual machine is not the same. The virtual machine Converts the Java byte code to the relevant instructions of the operating system to ensure its normal operation.
3, Java System support all the hardware platform, there is no problem you mentioned, you can rest assured that use.
4. The interpreter is in the Java Virtual machine, and the compiler is in the JDK or JRE.
5, Java Virtual machine is often said Java Runtime Environment, its abbreviation is JRE, installed in a directory under the operating system, this directory can be installed at your own discretion, as you install other application software. The JDK contains the JRE, as well as the development environment, such as the compiler, the Help document generator, and the jar library file for the system API.
The difference between compiled and interpreted &&java the process from compilation to execution