Re: null pointer exception on instanciating a matlab .jar class from plugin
Posted by Heerpa on Jul 06, 2011; 9:59am
URL: http://imagej.273.s1.nabble.com/null-pointer-exception-on-instanciating-a-matlab-jar-class-from-plugin-tp3683949p3683951.html
yes, sorry I meant
thismclass = new Aclass();
I do not know the term stack trace - is that the error messages? Those are:
java.lang.NullPointerException
at Testgetsquare_.run(Testgetsquare_.java:33)
at ij.IJ.runUserPlugIn(IJ.java:183)
at ij.IJ.runPlugIn(IJ.java:150)
at ij.Executer.runCommand(Executer.java:127)
at ij.Executer.run(Executer.java:64)
at java.lang.Thread.run(Thread.java:619)
where Testgetsquare_ my plugin is.
I checked java versions: I compile the plugins with java 1.6.0_26; Java HotSpot(TM) Client VM 20.1-b02 on NetBeans 7.0. I copy them into my normally running IJ (v1.45k, java version 1.6.0_14) plugins folder. The Aclass (in my case Testgetsquareclass) is created by the matlab deployment tool (matlab R2007a, it uses java version: Java 1.5.0_07 with Sun Microsystems Inc. Java HotSpot(TM) Client VM mixed mode)
might the different java versions be the reason for the null pointer?