• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JNI callback

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic