MATLAB: Problems with MATLAB Engine API for Java

eclipsejavaMATLABmatlab engine

I am trying to compile this piece of code:
import com.mathworks.engine.*;
public class javaEvalFunc {
public static void main(String[] args) throws Exception {
MatlabEngine eng = MatlabEngine.startMatlab();
eng.evalAsync("[X, Y] = meshgrid(-2:0.2:2);");
eng.evalAsync("Z = X .* exp(-X.^2 - Y.^2);");
Object[] Z = eng.getVariable("Z");
eng.close();
}
}
I found it on this web page: Java Engine
As you can see I need a reference to com.mathworks.engine.*;
This Page Info says that the .jar file that I need to Add is in this Path:
matlabroot/extern/engines/java/jar/engine.jar
But in my computer I just have a folder called phyton in this path
matlabroot/extern/engines
Where can I find the .jar file that I need ?
I am using Eclipse IDE by the way. thanks.

Best Answer

It would help if you used the documentation that come with your version. In R2016a, you will find no mention of the java engine, and that's because it's been introduced in R2016 (See the release notes under advanced software development).
You will have to upgrade to R2016b.
Related Question