MATLAB: How to call a MATLAB-compiled JAR file in Python in MATLAB Builder JA 2.1 (R2010a)

MATLAB Compiler SDK

I have created a JAR file complied in MATLAB. I want to know if I can call it directly from Python, without having MATLAB installed.

Best Answer

In order to call the compiled JAR file in Python, you need to have a driver Java application. The compiled JAR file needs a Java driver application to invoke MATLAB compiled function. This can be used on a machine which has no MATLAB installed, by installing the MATLAB Compiler Runtime (MCR). It is not possible to directly call the JAR file from Python.
The MATLAB Compiler Runtime installer is at the location:
$MATLABROOT\toolbox\compiler\deploy\ARCH
where $MATLABROOT is the root directory in which MATLAB is installed and ARCH is the architecture type of the system. This can also be obtained by the following command at the MATLAB prompt:
computer('arch')