Re: null pointer exception on instanciating a matlab .jar class from plugin
Posted by Heerpa on Jul 06, 2011; 5:29pm
URL: http://imagej.273.s1.nabble.com/null-pointer-exception-on-instanciating-a-matlab-jar-class-from-plugin-tp3683949p3683952.html
Hi,
the last stack trace was from a Netbeans-compiled plugin Testgetsquare_.java file. I put the Testgetsquare_.class into the plugins folder and opened that from ImageJ.
Now I opened the Testgestquare_.java with imageJ and compiled it here. The problem remains the same but I think the stack trace might be more intellible.. Not to me, though.. the javabuilder from the matlab deployment tool seems to load the nativemcl76.dll twice, which is a problem?
java.lang.UnsatisfiedLinkError: Native Library C:\Program Files\MATLAB\R2007a\bin\win32\nativemcl76.dll already loaded in another classloader
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1743)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1703)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1028)
at com.mathworks.toolbox.javabuilder.MWMCR.<clinit>(MWMCR.java:25)
at dogetsquare.dogetsquareclass.<init>(dogetsquareclass.java:46)
at Testgetsquare_.run(Testgetsquare_.java:26)
at ij.IJ.runUserPlugIn(IJ.java:183)
at ij.ImageJ.runUserPlugIn(ImageJ.java:264)
at ij.plugin.PlugInExecuter.run(Compiler.java:264)
at java.lang.Thread.run(Thread.java:619)
best, H