MATLAB: Is it possible to run 64-bit MATLAB Builder for Java 1.0 (R2006b) components on a 32-bit Java Virtual Machine (JVM)

MATLAB Compiler SDK

When I attempt to run a MATLAB Builder for Java component created on a 64-bit machine on a 32-bit machine, I receive the following error message:
Exception in thread "main" java.lang.UnsatisfiedLinkError: /opt/matlab/r2006b/bin/glnxa64/libnativemcl75.so: Can't load AMD 64-bit .so on a IA 32-bit platform
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1676)
at java.lang.Runtime.loadLibrary0(Runtime.java:822)
at java.lang.System.loadLibrary(System.java:993)
at com.mathworks.toolbox.javabuilder.MWMCR.<clinit>(MWMCR.java:18)
at com.mathworks.toolbox.javabuilder.MWUtil.GetUnknownClassID(MWUtil.java:1336)
at com.mathworks.toolbox.javabuilder.MWClassID.<clinit>(MWClassID.java:26)
at getmagic.main(getmagic.java:34)

Best Answer

It is not possible to run 64-bit Builder for Java components on a 32-bit Java Virtual Machine (JVM). You will need to install a 64-bit JVM and then run the component under that.
Similarly, if you compiled the Java component with a 32-bit version of MATLAB and you plan to deploy it on a 64-bit operating system, you will need to at least install the 32-bit version of the MATLAB Compiler Runtime (MCR) and the JVM on the 64-bit machine.
For components built with MATLAB Builder for Java 2.0.1 (R2008a) onwards, please refer to the documentation at:
<http://www.mathworks.com/access/helpdesk/help/toolbox/javabuilder/index.html?/access/helpdesk/help/toolbox/javabuilder/ug/bq9wh2r.html>
Related Question