概述
参考:http://www.cnblogs.com/skywang12345/archive/2013/05/26/3093593.html
http://www.2cto.com/kf/201501/372701.html
java 类:
package com.skywang.ndk;
public class MyInfo {
private String mName;
private int mAge;
private float mHeight;
public String toString(){
return "mName:"+mName+", mAge:"+mAge+", mHeight:"+mHeight;
}
}
============================================
Person.java:
package com.skywang.ndk;
public class Person {
private String mName;
private int mAge;
private float mHeight;
public String toString(){
return "mName:"+mName+", mAge:"+mAge+", mHeight:"+mHeight;
}
}
package com.skywang.ndk;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
public class NdkParam extends Activity {
public static final String TAG="skywang--NdkParam";
public static final String TAG_MY="MY_skywang--NdkParam";
/** Called when the activity is first created. */
private Person person=null;
private MyInfo myinfo = null;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Log.d(TAG, "on create.");
person = new Person();
for (int i=0; i<3; i++) {
getPersonInfoByIndex(person, i);
Log
最后
以上就是发嗲黄豆为你收集整理的java jni 结构体_JNI——结构体(即java中的类)的传入与设置——NativeMethod映射表...的全部内容,希望文章能够帮你解决java jni 结构体_JNI——结构体(即java中的类)的传入与设置——NativeMethod映射表...所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复