• Post Reply Bookmark Topic Watch Topic
  • New Topic

JNI callback

 
Joe Schaffer
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a timer called from a main function which automatically polls a JNI function. The native function is defined in a JniFunction class which doesn't contain the main function. If a special event happend on the dll side, a callback function is called.

The problem occurs if through this timer a callback function is called. I have to implement the callback in the main class, while all other callback functions which are directly generated by me through the java program have to be implemented in the JniFunction class, where all my native functions are defined. Any ideas why this happens?

Best regards

Joe
 
Joe Schaffer
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry,

I found my problem the function call
localRefCls = (env)->FindClass("JniFunctions");
was missing, it contained my main class!

Best regards

Joe
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!