T
Tim Wong
I am new with using JNI and haven't found any code snippets for what I
am trying to do....please bear with me.
-I have a java method (in java class TestClass) returning an object:
public Object getPublicKey(){
KeyPair kp;
....
....
PublicKey thePubKey = kp.getPublic();
return ( (Object)thePubKey );
}
-I have a C++ function trying to use JNI to run this like so:
(assumptions...I have the JNI MethodID of getPublicKey.)
bool CTestClass::getKey(){
???
}
Assuming I have the c++ pointers setup for an instance of "TestClass"
and a methodID for "getPublicKey()", What would be the proper way to
call getPublicKey() from C++? Once I get the Object returned from
getPublicKey(), how do I access it's methods and public members?
am trying to do....please bear with me.
-I have a java method (in java class TestClass) returning an object:
public Object getPublicKey(){
KeyPair kp;
....
....
PublicKey thePubKey = kp.getPublic();
return ( (Object)thePubKey );
}
-I have a C++ function trying to use JNI to run this like so:
(assumptions...I have the JNI MethodID of getPublicKey.)
bool CTestClass::getKey(){
???
}
Assuming I have the c++ pointers setup for an instance of "TestClass"
and a methodID for "getPublicKey()", What would be the proper way to
call getPublicKey() from C++? Once I get the Object returned from
getPublicKey(), how do I access it's methods and public members?