Talk About Network

Google


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 > Re: JNI CallSt...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 4 Topic 730 of 808
Post > Topic >>

Re: JNI CallStaticVoidMethod fails after N calls

by "Chris Uppal" <chris.uppal@[EMAIL PROTECTED] > Nov 22, 2006 at 02:59 PM

santiago538@[EMAIL PROTECTED]
 wrote:

> 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."

You mean you actually call fork() to create a new Unix process ??

If so then I'm extremely surprised that it works at all, let alone 64
times
before failing.

If not then I presume you mean that you start a new OS thread from your C
code
(within the same Unix process).   In that case I'd suspect that you are
doing
something "wrong" with your threads (or, also a plausible hypothesis
unfortunately, that Sun are doing something wrong with /their/ threads),
and
that the difference in behaviour has little to do with the way the JVM is
launched.  Check that you are being completely clean about how you access
AWT/Swing objects, and that you don't do /anything/ to them except from
code
runnng on the EDT.   Of course, that's only a guess; another possibility
is
that you have a good old-fa****oned deadlock which is not related to AWT at
all...

    -- chris
 




 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 Sat Jul 5 19:38:18 CDT 2008.