Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Callbacks from Native Code to java

843829Apr 28 2004 — edited Apr 28 2004
Hi all,

i trying to write a Java Wrapper over a C++-API, which uses Callback-Methods that can be called at unspecified times and need to be processed immediately before the callback-method returns.

there seems to be no way to call my java application from native code except creating a new virtual machine which makes no sense for me. is it right that the only thing i can do is running a java thread that frequently asks a native method, if a callback-method has been called and if so calls the corresponding java-method. but this approach seems to be too slow...

any ideas? thanks.

manu
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 26 2004
Added on Apr 28 2004
2 comments
320 views