First, thanks to all for response.
I haven't understand how I can manage the object pointer.
Can someone do an explicit example?
We can suppose that we have in java this code:
public class JObject {
private final long objectPtr = 0;
private native void objectCreate();
public static void main(String[] args){
JObject my = new JObject();
my.objectCreate();
}
}
In native code what will we write?
JNIEXPORT void JNICALL
Java_objectManager_objectCreate(JNIEnv *env, jobject obj)
{
CppObject *ptr = 0;
CppObject myCppObject;
ptr = &myCppObject;
??????????????????
}
Can someone rewrite correctly the above code with the target to
instance a C++ class (CppObject) and return to Java its pointer?
Thank you!!!!!