Java本地介面(JNI)程式設計指南和規範(第二章)
阿新 • • 發佈:2018-12-14
2. 3.
Use javac Use javah to
to compile the |---> generate header
program | file
| | |
|--HelloWorld.class -----------| |-->HelloWorld.h
| |
| | 4.
| |-----> Write the C
| implementation
| |------ of the native method
| HelloWorld.c <--|
| |
| | 5.
| |-------> Compile C
| Code and generate
| |-- native library
| 6. |
|--> Run the program |--> HelloWorld.dll
using the java |
interpreter <--------------------|
|
|--> "Hello World!"