Contenido principal

MATLAB Compiler SDK Java Target Requirements

To build and run Java® applications that integrate packaged MATLAB® code, you need MATLAB Compiler SDK™, a supported OpenJDK® installation, a matching version of MATLAB Runtime for end users.

System and Product Requirements

System Dependencies

Java applications with packaged MATLAB code can be developed on Windows®, Linux®, and macOS systems and deployed to any of these platforms. For exceptions, see Cross-Platform Support.

Product Dependencies

The following products must be installed:

  • MATLAB

  • MATLAB Compiler™

  • MATLAB Compiler SDK

Supported Java Versions

MATLAB supports the use of OpenJDK. For supported versions, see Versions of OpenJDK Compatible with MATLAB by Release.

Data API

MathWorks® provides two data APIs for handling data exchange between a Java application and packaged MATLAB code:

  • MWArray API

  • MATLAB Data API for Java

These data APIs are installed on your system when you install MATLAB and MATLAB Compiler SDK or MATLAB Runtime. For reference locations associated with these data APIs, see .

MATLAB Data API for Java is shared between MATLAB Compiler SDK and MATLAB Engine. For details, see .

Cross-Platform Support

Java applications with packaged MATLAB code can be developed on Windows, Linux, and macOS and deployed across these platforms. Cross-platform deployment requires platform-independent MATLAB code and libraries. If your code relies on platform-specific dependencies such as operating system calls, device drivers, or native libraries, it must be built and run on the same platform.

Development Environment

For details on how to set up your Java development environment for integrating packaged MATLAB code, see Set Up Java Development Environment.

MATLAB Compiler SDK Limitations

Consider the following limitations when creating Java packages using MATLAB Compiler SDK:

  • Special characters in MATLAB comments can cause compilation to fail. Remove special characters or replace them with XML characters. For example, "<" can be replaced with "&lt;".

  • JAR files created by MATLAB Compiler SDK cannot be loaded back into MATLAB with the MATLAB Java External Interface.

See Also

Topics