J
John Smith
Hi everyone,
Lets say you have a jni function which accepts a callback function.
This function should be set from within java and called if a failure happens
in the jni code.
The only examples I've seen of java callbacks are where the java function is
already known and hardcoded in the jni code. However assume you have a java
class which calls this jni function you want to be able to create multiple
objects of this class pointing to each their different function.
In other words how can I make a java function into a jni function pointer
and transfer it to the jni code. In .NET this is quite easy by using
delegates.
Is it possible in java too or do you need to hardcode the function name
inside jni?
Thanks in advance.
-- John
Lets say you have a jni function which accepts a callback function.
This function should be set from within java and called if a failure happens
in the jni code.
The only examples I've seen of java callbacks are where the java function is
already known and hardcoded in the jni code. However assume you have a java
class which calls this jni function you want to be able to create multiple
objects of this class pointing to each their different function.
In other words how can I make a java function into a jni function pointer
and transfer it to the jni code. In .NET this is quite easy by using
delegates.
Is it possible in java too or do you need to hardcode the function name
inside jni?
Thanks in advance.
-- John