If you want to achieve cross-platform, you must compile the corresponding dynamic library under the different operating system platforms. This results in a JAVA program that uses the JNI interface, which is no longer as free as cross-platform as before. Moreover, the binary code generated after compilation can only be run under the local operating system environment, because different operating system environments have their own local library and CPU instruction set, and the standard C/C++ specification and standard library function implementation of each platform. The development of JNI programs is limited by the system environment, because the code or module written in C / C + + language, the compiler process depends on some of the library functions provided by the current operating system environment, and linked with the local library. At the same time, this feature allows us to reuse a large amount of code previously written in C/C++. Because JNI is JVM specificationPart of it, so we can run the JNI program we wrote in any Java virtual machine that implements the JNI specification. The local interface refers to the interface developed by C and C++. The full name of JNI is the abbreviation of the first letter of the Java Native Interface.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |