Java and C ++ running mechanism

xiaoxiao2021-03-06  52

Java is said to be a language, it is better to say that a platform is more appropriate. Every class of Java has a Class file and it corresponds to it. Java is loaded into the virtual machine when the program is started, and the program is connected according to the Java virtual machine specification (dynamic connection), program Assembly is done when running. Therefore, the Java program is very easy to perform component development, and the components of the program are very easy to replace.

Like other language of C and other compilation, its assembly method is a traditional assembly method. C generates binary code suitable for a platform when compiling, find the library you want to call when the connection is connected, and then connect the code in these libraries into the executable, the generated executable runs very fast However, the executable code has become a whole, it is impossible to separate. (The situation of dynamic links is not considered)

C is of course also developed in the form of a component, such as COM, but those based on dynamic link libraries, non-across platforms, CoM actually define a binary component standard. Is not cross-platform.

转载请注明原文地址:https://www.9cbs.com/read-117640.html

New Post(0)