Contenuto principale

Summary of MATLAB Compiler SDK Java APIs

MATLAB® Compiler SDK™ provides two ways to deploy MATLAB functions within Java® applications. Each deployment option has a set of Java APIs that enable deployment. You can:

  • Deploy to Java Applications using MATLAB Data API for Java (since R2026a)

    • Application Interface: MATLAB Compiler SDK Java API with one option:

      • Generic Interface (since R2026a)

    • Data Interface: MATLAB Data API for Java (since R2016b)

  • Deploy to Java Applications using MWArray API (since R2006a)

    • Application Interface: MATLAB Compiler SDK Java API

    • Data Interface: MWArray API

Deploy to Java Applications Using MATLAB Data API for Java

Generic Interface (since R2026a)

  • In this approach, MATLAB Compiler SDK generates a code archive (.ctf file) containing MATLAB functions that you can deploy within a Java application.

  • You use the MATLAB Compiler SDK as an interface between the Java application and the code archive containing the deployed MATLAB code.

  • You use the MATLAB Data API for Java to handle data exchange between the Java application and deployed MATLAB Compiler SDK functions.

Deploy to Java Applications Using MWArray API

In this approach, MATLAB Compiler SDK generates a JAR file that serves as the main deliverable for integration. The MATLAB function being deployed is packaged into a .ctf archive, which is bundled into the JAR alongside automatically generated Java classes. These classes handle loading the .ctf file, managing MATLAB Runtime, and exposing Java methods that make the MATLAB functions callable from Java code. The MWArray API is used to facilitate data exchange, providing Java representations of MATLAB data types such as arrays, cells, and structures.

See Also

Topics