Working with MATLAB Builder JA

Together, MATLAB, MATLAB Compiler, and MATLAB Builder JA enable you to develop applications using MATLAB, and then incorporate them in Java programs. You use MATLAB—a high-level, matrix-optimized language with built-in math, graphics, and data analysis functions—to rapidly prototype, implement, and test your algorithms. Once an application is complete, you use the builder to automatically package MATLAB code as Java classes. These classes can be integrated in a Java application and referenced in the same way as standard Java classes.

Like other Java components, the JAR files generated by the builder are generally platform-independent and run on any platform supported by MATLAB. Some toolbox functions are implemented as MEX-files, which are platform-dependent, making these functions and any Java components that use them not portable.

To create portable Java classes from MATLAB functions, MATLAB Builder JA encrypts the functions and generates a Java wrapper around them. To deploy these classes, you first install the MATLAB Compiler Runtime (MCR) on a target computer, and then run the classes incorporated in a Java program against the MCR. The MCR (provided with MATLAB Compiler) is the full set of shared libraries required for executing MATLAB based components. It provides complete support for all features of the MATLAB language and most toolboxes.

Using MATLAB Builder JA to convert the MATLAB file

Using MATLAB Builder JA to convert the MATLAB file plotfft.m into a Java component called SpectralAnalysis, with a class called Fourier.

Next: Building and Packaging Components

Try MATLAB Builder JA

Get trial software

MATLAB アプリケーション配布入門

View webinar