Sie sind auf Seite 1von 6

MATLAB Builder JA 2.2.

2
for Java language
Deploy MATLAB code as Java classes
MATLAB Builder JA enables you to create Java classes from your MATLAB programs. These Java classes can be integrated into Java programs and deployed royalty-free to desktop computers or Web servers that do not have MATLAB installed. When used with MATLAB Compiler, the builder creates deployable components that make MATLAB based computations, visualizations, and graphical user interfaces accessible to end users of the Java programs. When the Java program is deployed to the Web, multiple users can access it through a Web browser. The builder encrypts your MATLAB functions and generates a Java wrapper around them so that they behave just like any other Java class. Java classes created with MATLAB Builder JA are portable and run on all platforms supported by MATLAB.

MATLAB Builder JA Overview

5:26

Create MATLAB based Java components for use by non-MATLAB users and integrate them into the main Java Web application.

Key Features Royalty-free desktop and Web deployment of Java classes MATLAB figure zooming, rotating, and panning via the Web Figures interface Ability to port classes not containing MEX-files to all MATLAB supported platforms API for automatic conversion between Java and MATLAB data types

Java Web application for visualizing a surface plot of the MATLAB peaks function. The builders Web Figures interface provides the zoom, pan, and rotate icons, letting the end user manipulate the image.

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 MATLABa high-level, matrix-optimized language with built-in math, graphics, and data analysis functionsto 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.

Using MATLAB Builder JA

6:48

Create a deployment tool project, add a MATLAB script, compile it into a Java component, integrate the component into a Java application, test and prepare it for distribution to non-MATLAB users.

To create portable Java classes from MATLAB functions, the builder 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 plotfft.m into a Java component called SpectralAnalysis, with a class called Fourier.

Building and Packaging Components with the Deployment Tool The Deployment Tool is a graphical user interface provided by MATLAB Compiler. You use it to build Java classes from MATLAB applications and then package them for deployment. From the Deployment Tool you can: Add MATLAB files and MEX-files to serve as externally visible class methods of your component Automatically collect and package the files to deploy with the component Add supporting files, including the MCR, to be packaged with your component in a self-extracting executable Save compilation and packaging preferences

Financial application for calculating and visualizing Black-Scholes option value. The application uses MATLAB functions converted into a Java class by the builder to perform calculations and produce graphs.

Accessing Components After instantiating a Java class from a MATLAB based component, you can access MATLAB functions as native Java methods. Native Java data types passed to MATLAB functions are automatically converted to MATLAB data types. Alternatively, you can explicitly select the data type to use.

A Java Swing GUI that calls MATLAB code for a loan amortization calculation using Java Native Interface (JNI).

Deploying MATLAB Based Java Components on a Desktop Computer You integrate a MATLAB based Java class into an existing Java application by installing both the class and the MCR (royalty-free) on the target computer. The MCR provides complete support for all features of the MATLAB language and most toolboxes. The Java application serves users working on the target computer. Using the builders Remote Method Invocation (RMI) interface, you can also run your class as a persistent service or spread processing across multiple processes or computers.

Mean-variance portfolio optimization and generation of an efficient frontier. Computed risk/return pairs and the associated stock weights are listed for each risk/return value. The graphical interface is written using the Java Swing libraries, and the underlying mathematics is performed by a Java component created by MATLAB Builder JA.

Deploying MATLAB Based Java Components on a Local Network or the Web Deploying Java components on a local network or Web server enables multiple users to access an application in which the Java component is integrated. You install the MCR on the server only, and users can execute the application without installing MATLAB or the MCR on their individual computers. Users can interact dynamically with MATLAB figures through the builders Web Figures interface for handling the 2D and 3D data visualization such as zooming, rotating, and panning.

MATLAB Builder JA WebFigures

5:22

Create interactive WebFigures from MATLAB figures and integrate them into a JSP page.

You can also access MATLAB Web applications deployed as Java components with service-oriented architectures (SOAs), SOAP services, WDSL language, RMI interfaces, HTTP services, Java servlets, and JSPs.

Financial application for calculating and visualizing Black-Scholes option value implemented as a MATLAB Web application. The application uses MATLAB functions converted into a Java class by MATLAB Builder JA to perform calculations and produce graphs.

Resources
Product Details, Demos, and System Requirements www.mathworks.com/products/javabuilder Trial Software www.mathworks.com/trialrequest Sales www.mathworks.com/contactsales Technical Support www.mathworks.com/support Online User Community www.mathworks.com/matlabcentral Training Services www.mathworks.com/training Third-Party Products and Services www.mathworks.com/connections Worldwide Contacts www.mathworks.com/contact

2011 The MathWorks, Inc. MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other product or brand names may be trademarks or registered trademarks of their respective holders.

Das könnte Ihnen auch gefallen