Giter VIP home page Giter VIP logo

jnidemo's Introduction

JNIDemo

jni学习系列源码 首先,看一下项目的体系架构。项目分为3个部分:Java部分,c/c++部分,以及一个makefile文件。

java部分:定义native方法,并加载动态连接库,当然还有我们项目的源码,class文件,res资源等。

c/c++部分:包括.c或.cpp文件以及.h头文件,在.c/.cpp文件中实现java层中定义的native方法。

Makefile文件:是对 java 、src 目录下的文件进行编译组织进而生成可执行文件的文件

接下来通过一系列实例来学习JNI编程:

  1. 如何调用C/C++中的函数
  2. 如何调用C/C++中自定义的函数
  3. 如何在jni函数中访问java类中的对象实例域
  4. 如何在jni函数中访问java类中的静态实例域
  5. 如何在jni函数中调用java对象的方法
  6. 如何在jni函数中调用java类的静态方法
  7. 如何在jni函数中传递基本数据类型参数
  8. 如何在jni函数中传递对象类型参数
  9. 如何在jni函数中处理字符串
  10. 如何在jni函数中处理数组
  11. 处理jni函数中的返回值情况
  12. 在jni中实现创建java类对象
  13. jni编程实践……

jnidemo's People

Contributors

honjane126 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.