This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gcj+cni] Segmentation fault when accessing java code from c++


Christian Nolte wrote:


int main() { Test t; t.test2(); } - ---

.
.
.

Am I doing something wrong, i.e. do I miss some preinitialization which is needed to get CNI working? Or is this a bug in my libgcj?


In short yes. If you are calling from C++ into CNI code, you must use the invocation interface (much as you must use the JIN invocation interface when using JIN).


See: http://gcc.gnu.org/onlinedocs/gcc-4.3.0/gcj/Invocation.html

For details.

David Daney


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]