An example of a Java application calling C, and the C calling Java methods?
From: Clayton E. Cramer (clayton_at_claytonDELETETHIScramer.com)
Date: 07/26/04
- Next message: Benjamin Outram: "Re: Windows environment error while trying to execute 16-bit application using the Runtime object."
- Previous message: Roedy Green: "Re: Strings and Hashtables"
- Next in thread: Roedy Green: "Re: An example of a Java application calling C, and the C calling Java methods?"
- Reply: Roedy Green: "Re: An example of a Java application calling C, and the C calling Java methods?"
- Reply: Jim Sculley: "Re: An example of a Java application calling C, and the C calling Java methods?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 25 Jul 2004 23:11:11 -0600
I have been able to use the JNI to write a Java application that calls C
functions, but I am having a heck of a time getting the C functions to
reliably call Java methods. I believe that the problem has to do with
multiple threads and not having the correct value for the JNIEnv when the C
function decides to invoke a Java method. There must be some way for a C
function to retrieve the current JNIEnv that invoked this C function,
without passing it in.
Please?
- Next message: Benjamin Outram: "Re: Windows environment error while trying to execute 16-bit application using the Runtime object."
- Previous message: Roedy Green: "Re: Strings and Hashtables"
- Next in thread: Roedy Green: "Re: An example of a Java application calling C, and the C calling Java methods?"
- Reply: Roedy Green: "Re: An example of a Java application calling C, and the C calling Java methods?"
- Reply: Jim Sculley: "Re: An example of a Java application calling C, and the C calling Java methods?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|