I developed an ImageJ PlugIn which uses functions contained in dll made in LabView. The using of this dll needs a JNI interface in C language.
So, I have a PlugIn ImageJ which load the dll of the JNI interface which himself load a LabView dll (a library of calculation):
PlugIn ImageJ (Java) -> Interface JNI dll (C) -> Bibliothèque de calcul dll (LabView)
Where -> is a dll load.
This PlugIn work very well during his first using but if we try, in the same ImageJ session, to launch many times this PlugIn (i.e. instantiate many objects PlugIn), the PlugIn stay blocked at the call of the first LabView function.
In order to try to localize the error I replaced the calculation dll in LabView by a classic C dll. With this replacement there is no error and the PlugIn can be call as many times as we want.
On the other side, if I try to launch a PlugIn thanks to a classic Java program by simulating the calling of a PlugIn by ImageJ (i.e. loading and dynamic instantiating of compiled java classes thanks to a ClassLoader), we can also launch the PlugIn many times.
The problem could come from the fact that ImageJ launch a LabView runtime which is not necessary unloaded and which during the second loading could be a problem.
I’m wondering if you could give me some information about that and if someone had ever face this problem.