JavaPackage Integration
WithMATLAB编译器SDK™,将编译的MATLAB函数集成到Java应用程序中,涉及使用初始化的API组合MATLAB运行时, load the compiled MATLAB functions intoMATLAB运行时,并管理Java和Matlab之间传递的数据。
Java packages and applications provide portable and scalable solutions for applications in large-scale enterprise or web environments. You can deploy generated packages to enterprise or web environments whereMATLAB运行时is installed.
Java Remote Method Invocation (RMI) is a set of APIs that enable Java objects to invoke objects in a different Java virtual machine (JVM). Use RMI to develop client-server applications, distributed applications, and web applications. For such applications, only the portions of the application that directly invoke MATLAB functions requireMATLAB运行时. The other portions of the application can work with native Java data types.
Functions
compiler.build.javaPackage |
创造Javapackage for deployment outsideMATLAB |
compiler.build.JavaPackageOptions |
Options for buildingJavapackages |
mcrinstaller |
Display version and location information forMATLABRuntimeinstaller corresponding to current platform |
mcrversion |
ReturnMATLABRuntimeversion number that matchesMATLABversion |
Java API文档
Topics
要求和亮点
- Requirements and Limitations of MATLAB Compiler SDK Java Target
Refer to the software requirements for usingMATLAB编译器SDKto create Java packages. - Configure Your Java Environment for Generating Packages
配置Java环境以编译MATLAB代码和开发Java应用程序。 - MATLAB编译器SDK Java集成如何工作
Learn how theMATLAB编译器SDKJava处理数据。 - MATLAB编译器SDK生成的编程接口
了解为处理MATLAB方法创建的功能签名。
创造and Integrate withJava
- Generate Java Package and Build Java Application
创造a Java package in MATLAB and implement it with sample Java code.
Sample Applications
- Integrate Simple MATLAB Function Into Java Application
了解如何将MATLAB生成的Java软件包集成到Java应用程序中。 - 在Java应用程序中显示MATLAB图
Build a Java application that displays a MATLAB plot. - 创造Java Phone Book Application Using Structure Array
Encapsulate a MATLAB function that modifies a structure array containing phone numbers. - 创造Java Application with Multiple MATLAB Functions
实施信号分析仪应用程序,该应用程序使用依赖分析结合了多个功能。 - Assign Multiple MATLAB Functions to Java Class
创建一个包含多个功能以实现矩阵数学程序的Java软件包。 - 利用MATLAB Class in Java Application
使用面向对象的设计在Java软件包中部署MATLAB类。 - Pass Java Objects to MATLAB
Build a Java package that applies optimization routines to objective functions using theMWJavaObjectRef
class. - Block Console Display When Creating Figures in Java
利用waitForFigures
in a console-based Java application that generates MATLAB figures.
数据管理
- 在Java和Matlab之间转换数据
See guidelines on how to convert data between Java and MATLAB. - Java和Matlab之间的数据转换规则
请参阅将Java类型转换为MATLAB类型的规则。 - 在JVM中管理MATLAB资源
Properly create and dispose of MATLAB data in your code. - Java中的MATLAB图像数据
See techniques to work effectively with figure and image data in your code. - 在Java应用程序中指定并行计算工具箱配置文件
Specify profile information for Parallel Computing Toolbox™ applications.
Deployment Considerations
- 定义可部署Java档案的嵌入式和提取选项
Manage deployable archive embedding and extraction behavior using either the MWComponentOptions class or environment variables. - Ensure Multiplatform Portability for Java
Ensure platform independence in your compiled MATLAB code. - Limitations on Multiple Packages in Single Java Application
Learn the data types that cannot be shared across Java packages.
Remote Method Invocation
- Remote Method Invocation for Client-Server Applications
Learn how RMI allows you to run separate processes on multiple machines. - 使用RMI运行客户端和服务器
Try an example using RMI with a client and server. - 代表天然Java单元和结构阵列
See an example illustrating the use of native Java cell and struct arrays.
TroubleshootingJava软件包
- Common Failure Messages
Common error messages during Java package integration and possible workarounds.