This step-by-step tutorial will show you how to set up a Netbeans Project to develop ImageJ plugins, which are using MATLAB code (wrapped with MATLAB Builder JE).
In this tutorial I'm not going to describe how to write a plugin, but if you succeed and develope one, then in the end you will have a plugin, that will be able to use ImageJ functions, other ImageJ plugins, external jar files, and jar files which call MATLAB functions without having MATLAB installed. You will only need MCR (described below), which is completely free.

Before you start you have to install the following programs (I used these, don't know if it works with other versions):
- MATLAB R2010a (!)
- MCR (MATLAB Compiler Runtime) v7.13 (!)
- Netbeans 6.9.1 (!)
- ImageJ (any version, but tested on 1.44e)

Follow this guide: http://www.mbl.edu/research/labs/adlc/CamAcqJ/NetBeansforIJDevelopment.html
This will show you how to create Netbeans project, how to update to the latest ImageJ source code, and how your build.xml should look like. You will have to compile your plugins every time you make some changes, but this is the best method I found to separate plugin compiling and source code compiling.

Both for 'plugins' and 'src' set the same Classpath entries:
- ij.jar (ImageJ main jar file)
- MATLAB MCR v713\toolbox\javabuilder\jar\javabuilder.jar (this contains the MATLAB type and function definitions, which you have to use to communicate with MATLAB MCR through Java code)
- plugins/… (any jar files, which have been created with MATLAB Builder JA). It's important to copy those jar files to the 'plugins' directory if you want to use them from your ImageJ plugin

Now you have set the environment to successfully develop a ImageJ plugin which uses MATLAB user created .jar files.
Make sure you don't use namespaces in plugins, because otherwise you can't reach those MATLAB wrapper classes (or it will be difficult).

To call your wrapped MATLAB function you have to instantiate the wrapper class. In Netbeans you can browse your jar files, and see their structure and all of the wrapped classes. With Netbeans works 'intellisense', so you can browse your MATLAB functions after typing the class instance and putting a dot.