E
Edsoncv
Hello
I have the following problem. In Java I have a class named nlo, it has
as its members three objects of type nla (say nla1, nla2, nla3). The
class nla has a method setx(). I would like to access the method
nla.setx() from C++ using JNI. The arguments of my native function is
something like this (generated by Javah):
JNIEXPORT void JNICALL
Java_br_com_vrtech_JEqs_JNLPSolver_solveNLPnative
(JNIEnv * env,
jobject obj_this)
I have done the code bellow but I can go on since I don't know how to
access a method of an object that is a member of another.
jclass cls
jmethodID mid;
jfield fnlp1;
refe = env->PushLocalFrame(20);
cls = env->GetObjectClass(obj_this));
fnlp1 = env->GetFieldId(cls, "nlp", "methodsignature");
How to get a reference to nla1 or nla2, or nla3. I hope I made myself
clear.
Thanks
I have the following problem. In Java I have a class named nlo, it has
as its members three objects of type nla (say nla1, nla2, nla3). The
class nla has a method setx(). I would like to access the method
nla.setx() from C++ using JNI. The arguments of my native function is
something like this (generated by Javah):
JNIEXPORT void JNICALL
Java_br_com_vrtech_JEqs_JNLPSolver_solveNLPnative
(JNIEnv * env,
jobject obj_this)
I have done the code bellow but I can go on since I don't know how to
access a method of an object that is a member of another.
jclass cls
jmethodID mid;
jfield fnlp1;
refe = env->PushLocalFrame(20);
cls = env->GetObjectClass(obj_this));
fnlp1 = env->GetFieldId(cls, "nlp", "methodsignature");
How to get a reference to nla1 or nla2, or nla3. I hope I made myself
clear.
Thanks