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!

Java calling C/C++ and back (asynchronously)

843829Jun 2 2006 — edited Jun 3 2006
Hi everybody!, i have the following issue.

I have an API in a dll wich allows you to register functions (in C) which will be called when some event occurs.
I have to register a Java function so i hava a native method from wich i can access this dll and register another C function into the API, which will call the desired Java method.

The problem is that i can get back to Java from within the native method, but i can't get to access from the C callback function which is called by the API asynchronously. What i'm doing is trying to instanciate another JVM from the C callback function, but i can't.

Is this the right way to go? Should i try something different?

Thanks!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 1 2006
Added on Jun 2 2006
3 comments
137 views