主要内容

Java图书馆inMATLAB

Access Java®libraries from MATLAB®

You can access existing Java classes to use in the MATLAB workspace. For example, use built-in class packages, such asjava.util, which are included in the Java language. See your Java language documentation for descriptions of these packages. You also can access classes defined in individual.classfiles, packages, or Java Archive (JAR) files, including classes you develop.

You can run MATLAB with your system version of the Java Runtime Environment (JRE™). For information about Java versions compatible with MATLAB, seeMATLAB Interfaces to Other Languages. To set the JRE path in MATLAB, calljenv. To set the path from the operating system prompt, callmatlab_jenv.

funzioni.

Isjava. Determine if input isJavaobject
javaaddpath Add entries to dynamicJavaclass path
javaArray 构造Javaarray object
javachk Error message based onJavafeature support
javaclasspath ReturnJava类路径或指定动态路径
javaMethod CallJavamethod
javaMethodEDT CallJavamethod from Event Dispatch Thread (EDT)
javaObject. CallJavaconstructor
javaObject.EDT CallJavaconstructor on Event Dispatch Thread (EDT)
javarmpath. Remove entries from dynamicJavaclass path
usejava Determine ifJavafeature is available
jenv Set杰瑞Java Runtime Environment path forMATLAB
matlab_jenv Set杰瑞Java Runtime Environment path forMATLABfrom system prompt

Classi

matlab.exception.javaException. Capture error information forJava异常

Argomenti

开始

开始with Java Libraries

Requirements for using the MATLAB Java interface.

Java Class Path

将Java类带入MATLAB工作区。

UsingJava图书馆

调用Java方法

How to call a method in the Java standard library classjava.util.ArrayList.

Call Method in Your Own Java Class

Use the dynamic class path to develop your own Java classes.

Call Back into MATLAB from Java

How to write Java programs that call into MATLAB from a running MATLAB.

使用导入函数简化Java类名

Use theimportfunction to refer to a class by its class name only.

Java Packages to Be Removed

Add Java packages to MATLAB static path.

Risoluzione dei problemi

Java堆内存首选项

How to adjust the Java heap size.

Avoid Calling Java main Methods in MATLAB

How MATLAB handlesmainmethods.