Are JAR files built using MATLAB Compiler SDK platform independent?

2 次查看(过去 30 天)
I would like to compile my M-function into a Java class using MATLAB Compiler SDK (MATLAB Builder JA in earlier releases) on one platform and distribute my Java archive in a platform independent manner.

采纳的回答

MathWorks Support Team
编辑:MathWorks Support Team 2020-7-21
In general Java classes built using MATLAB Compiler SDK are platform independent since MATLAB files are platform independent, as are JAR-files. There is a caveat when using C code shared libraries or MEX files which are not platform independent. In some instances, the MATLAB or Toolbox functions you are using in your application may depend on MEX files.
In this case, the easiest solution is to recompile the Java module with MATLAB Compiler SDK on each target platform.
It is also possible to avoid recompiling by moving the corresponding MEX files from each platform to your compile machine and include them in the build process using the –a flag to archive these files in the CTF.
Please see the documentation on “Ensuring Multi-Platform Portability”.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Troubleshooting in MATLAB Compiler SDK 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by