Matlab / JAVA GUI

Hi there,

I try to interface Matlab code with a JAVA graphical interface ... so I created first my matlab library and then created an other one with c++/matlab I can call from JAVA with JNI ;)

everything work well but ... here is my problem:

When I initialize my matlab library, the GUI just go away !! without any prompt !! so I don't know at all what happen ...

I try to initialise the library when I built my main class ... there is no crash but the L&F is different and the JFileChooser is not accessible anymore ! so I try to make the library being intialised on a click event ... what lead to a crash (the GUI go away without any prompt) ... so there is definitly interaction between JAVA GUI and matlab !!!

Did anybody has the same trouble ? and if yes how did you do to figure out ?

my guess is matlab use a different JVM and kill the other one (the GUI one) ... and if initialise at the begining all the application run under a older JVM (what lead to a different comportement). What do you think about that ?

please I'm so frustrated about that as far I'm on this problem since several days !!

Do you have any solution (other that to change the GUI language !)

thx

Jerome

[1257 byte] By [Malweea] at [2007-10-3 2:01:56]
# 1
sorry just a precision ...I'm working under red hat 8.0; matlab 7.2; and jdk 1.5.0_04 under eclipse 3.1
Malweea at 2007-7-14 19:00:40 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 2

> Hi there,

> I try to interface Matlab code with a JAVA graphical

> interface ... so I created first my matlab library

> and then created an other one with c++/matlab I can

> call from JAVA with JNI ;)

>

> everything work well but ... here is my problem:

> When I initialize my matlab library, the GUI just go

> away !! without any prompt !! so I don't know at all

> what happen ...

Possibilities

1. The app crashed. In unix you should have a dump file.

2. Something, even in matlab, called the equivalent of java's System.exit()

Basic reasons for this are that you are doing something wrong with the interface (to matlab.)

You should create a complete solution to matlab as a library without doing anything at all in JNI (no JNI calls.) That would be your interface shared library. Then test it via a simple command line test tool (an executable that uses that shared library.)

Only once that works should you attempt to create JNI wrapper.

jschella at 2007-7-14 19:00:40 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 3
Hi,Check your disk for hs_err_XXXX.log files (were XXX is the PID of the crashed process), they contain usefull information for debuging.--Marc ( http://jnative.sf.net)
mdentya at 2007-7-14 19:00:40 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 4
Hi, i would like to test your interface and, if were possible, help you with some debuging at least, 'cause maybe we need to do something similar.
cehgxa at 2007-7-14 19:00:40 > top of Java-index,Java HotSpot Virtual Machine,Specifications...