Posted by
dscho on
Jul 06, 2011; 8:22pm
URL: http://imagej.273.s1.nabble.com/null-pointer-exception-on-instanciating-a-matlab-jar-class-from-plugin-tp3683949p3683957.html
Hi Heinrich,
On Wed, 6 Jul 2011, Heinrich Grabmayr wrote:
> >On Wed, 6 Jul 2011, Heerpa wrote:
> >
> > >Hum, I have not run "update menus" (I didn't know about it, so I
> > >always update the menus by restarting IJ). Might the problem be that
> > >I built the file before so that java somewhere keeps nativemcl76.dll
> > >loaded which causes a problem the next time? But then, the first try
> > >this morning went wrong, too..
> > >
> > >Is it possible that I implicitely load the dll twice in the plugin?
> >
> >Must be that.
> >
> >I fear that you need to use either Matlab's Compiler (not Compiler JA)
> >or Coder Toolbox instead, since I doubt that you can somehow control
> >how the Matlab Runtime tries to load the classes when built with
> >Compiler JA.
>
> up to now, I was under the impression that matlab compiler, and compiler
> JA / builder JA was the same.. well I used the tool you get with typing
> deploytool. using the mcc command, you do not get java files, do you?
>
http://www.mathworks.com/help/toolbox/compiler/bsl9d99.htmlThe Compiler and Compiler JA toolboxes are different (although you cannot
have JA without Compiler, you have to pay for both separately).
What we did -- because we had too many problems trying to get the
JA-compiled code running on all three Operating Systems supported by Fiji,
MacOSX, Windows and Linux -- was to compile using Compiler (because Coder
did not exist yet, back then) and to wrap using JNI.
Ciao,
Johannes