Recognize the native method when learning java virtual machine
What is the native
A Java Native Method Invocation Interface is a non-Java code. We put this kind of interface called JNI (Java Native Interface), which provides a number of API implements the Java language and other communication (mainly C & C ++), which allows Java code and code written in other languages to interact. These interfaces depends on further study.
native implementation process
1. Write java code
2. The code is compiled as a java class file
3. javah class files into the file header c and write specific method .h file header, and generates java files with dll library two files
4. run java program, System.loadLibrary () function call in a dll