(J)Frame disapears after a few seconds, when invoked by C in Linux
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   S_Visser
Posted On:   Friday, November 23, 2001 12:28 AM

I'm experiencing problems using JNI to instanciate a simple JFrame class from C in Linux. My C-program runs, finds the virtualmachine and all classes needed. I can instanciate every class and call its members. Also my JFrame class. But as soon as a call .show() ,or any call that should display the actual frame, the frame appears only for a few milliseconds and disappears again. The c-program immidiatly exists without any errors. Using debugprints shows that as soon as the javacode finished and return to C, c exits. This is not the case if i won't show or visualize the javaframe. The c-code then just continues running. Searching the internet, i find i'm not the only one having thi   More>>

I'm experiencing problems using JNI to instanciate a simple JFrame class from C in Linux.


My C-program runs, finds the virtualmachine and all classes needed. I can instanciate every class and call its members. Also my JFrame class.


But as soon as a call .show() ,or any call that should display the actual frame, the frame appears only for a few milliseconds and disappears again. The c-program immidiatly exists without any errors.


Using debugprints shows that as soon as the javacode finished and return to C, c exits. This is not the case if i won't show or visualize the javaframe. The c-code then just continues running.


Searching the internet, i find i'm not the only one having this problem. Unfortunatly no one found a solution. That;s why i'm asking guru's now...


Help would be much appreciated.


(I did not include any code. To reproduce, you just have to invoke a vm from c in linux and create a javaobject wich shows a jframe. I'm using jdk1.3.1 within Mandrake, gcc2.96. But the problem also occurs in RedHat7.1 and on both distributions using jdk1.4.0beta)

   <<Less
About | Sitemap | Contact