1. 程式人生 > >JNI打通java和c

JNI打通java和c

div sys brush led and ftw orm doc ive

1、JNI簡介

The Java Native Interface (JNI) is a programming framework that enables Java code running in a Java Virtual Machine (JVM) to call and be called by[1] native applications (programs specific to a hardware and operating system platform) and libraries written in other languages such as C, C++ and assembly.

   --引用於wiki

官方文檔:

https://docs.oracle.com/javase/8/docs/technotes/guides/jni/spec/jniTOC.html

2、Java調用C

  2.1、java類文件中定義本地方法,其他方法調用此本地方法

  2.2、編寫本地方法的實現

  

  2.3、調用非JNI規範的C方法

3、C調用Java

JNI打通java和c