• Post Reply Bookmark Topic Watch Topic
  • New Topic

Little problem with JNI and arrays  RSS feed

 
Jarosław Piotrowski
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.

I'm trying to do some array operation with JNI. I want the native code to do produce some array content and update it to java array, but I want it to obtain copy once, and only update content later multiple times.

So I did it this way i c:
http://dev.keraj.net/jni/jni_Shit.c

and Java code looks like:

(of course library is already loaded at this point)

and I get FATAL ERROR (ACCESS VIOLATION) in Java_jni_Shit_commit
althrough if I call Java_jni_Shit_commit inside native Java_jni_Shit_init then it works.
So, I think I've missed something... why I can't just do release in another JNI call?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!