Re: netbeans and imagej

Posted by dscho on
URL: http://imagej.273.s1.nabble.com/netbeans-and-imagej-tp3687112p3687113.html

Hi,

On Wed, 18 Aug 2010, József Pálfalvi wrote:

> Can you help me to compile and run plugins with netbeans? I'm not a
> beginner, but I've some difficulties using external .jar files with
> netbeans + imagej. Heres is my problem: I've some very complicated math
> algorithms in MATLAB. I successfully generated .jar files from the
> MATLAB code(by MATLAB built-in .jar builder) (I tested them using sample
> projects in netbeans). But now I want to write a plugin which uses this
> .jar file. I set up the netbeans project as described here:
> http://rsb.info.nih.gov/ij/developer/NBTutorial.html

It would be nice to benefit from your work in the end.

> But when I want to run my plugin from ImageJ (started in debug mode by
> netbeans), than I get this error:
> "Plugin or class not found: My_plugin"
> (java.lang.
> NoClassDefFoundError: com/mathworks/toolbox/javabuilder/MWArray)
>
> So the main problem is, that in this ANT script structure I can't add
> external libraries to the project so that ImageJ sees it while
> running/debugging.

You could use the <unjar> tag. Please find an example here:

http://www.java-tips.org/other-api-tips/ant/how-to-use-unjar-untar-unwar-unzip-task-2.html

Hth,
Johannes