Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java Machine > JNI CallStatic...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 730 of 803
Post > Topic >>

JNI CallStaticVoidMethod fails after N calls

by santiago538@[EMAIL PROTECTED] Nov 21, 2006 at 05:47 AM

I have written an application in Java and C on the Solaris 10 (x86)
platform using the JDK 1.5.0_09. The Java code calls a native method
"startButtonWatcher," which then forks, the parent process returning,
and the child process initiating an event loop that calls a static
method, "sendButtonEvent," on a Java class "ButtonWatcher."

The problem is that on the 65 invocation, the CallStaticVoidMethod will
hang. There is no core file or pid log file produced. (it will also
hang for CallVoidMethod as well if I remove the static declaration in
ButtonWatcher.)

I have also added a main() function to the C code so that it can be
compiled and run as an executable rather than a library file loaded
from Java, and the the same loop will be fine, the Call*Method call
being exected forever (or over a million times at least). The only
difference in the code is the JVM--in the sharable library, it uses the
JVM of the class that calls the native method, and the standalone has
to create its own. What could be the problem? Thanks!




 4 Posts in Topic:
JNI CallStaticVoidMethod fails after N calls
santiago538@[EMAIL PROTEC  2006-11-21 05:47:55 
Re: JNI CallStaticVoidMethod fails after N calls
"Chris Uppal" &  2006-11-22 14:59:20 
Re: JNI CallStaticVoidMethod fails after N calls
santiago538@[EMAIL PROTEC  2006-11-22 10:37:11 
Re: JNI CallStaticVoidMethod fails after N calls
"Chris Uppal" &  2006-11-23 11:41:20 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed May 14 5:50:06 CDT 2008.