Java Package Integration
MATLAB Compiler SDK™ provides two ways to deploy MATLAB functions within Java applications:
Deploy to Java Applications using MATLAB Data API for Java (since R2026a)
Deploy to Java Applications using MWArray API
Deploying MATLAB code to a Java application using the MATLAB Data API for Java is the newer and modern of the two options and offers the following advantages:
MATLAB Runtime instances can run either in-process or out-of-process with respect to the Java application, and deployed MATLAB functions can be executed either synchronously or asynchronously.
Thread-safe design facilitates concurrent data creation and consumption across multiple threads without the need for locking, leading to improved performance, particularly when there’s extensive manipulation of MATLAB data in multiple threads.
Transitioning between Java based MATLAB Engine applications and deployed MATLAB applications can now be accomplished with minimal effort.
MathWorks® recommends deploying to Java using the MATLAB Data API for Java to take advantage of these capabilities. However, to select the right deployment option for your project, see Choose Java Deployment Option.
MATLAB Runtime must be installed and set up on the machine running the Java application. For details, see Download and Install MATLAB Runtime.
Categories
- Deploy to Java Applications Using MATLAB Data API for Java
Integrate packaged MATLAB functions into Java applications using the MATLAB Data API for data exchange
- Deploy to Java Applications Using MWArray Data API
Integrate packaged MATLAB functions into Java applications using the MWArray API for data exchange