This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

Call Java Libraries

Access Java® libraries from MATLAB®

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


javaArray Construct Java array object
javaclasspath Return Java class path or specify dynamic path
javaaddpath Add entries to dynamic Java class path
javarmpath Remove entries from dynamic Java class path
javachk Error message based on Java feature support
isjava Determine if input is Java object
usejava Determine if Java feature is available
javaMethod Call Java method
javaMethodEDT Call Java method from Event Dispatch Thread (EDT)
javaObject Call Java constructor
javaObjectEDT Call Java constructor on Event Dispatch Thread (EDT)
cell Create cell array
class Determine class of object
clear Remove items from workspace, freeing up system memory
depfun List dependencies of function or P-file
exist Check existence of variable, function, folder, or class
fieldnames Field names of structure, or public fields of object
im2java Convert image to Java image
import Add package or class to current import list
inmem Names of functions, MEX-files, classes in memory
inspect Open Property Inspector
isa Determine if input is object of specified class
methods Class method names
methodsview View class methods
which Locate functions and files


matlab.exception.JavaException Capture error information for Java exception
Was this topic helpful?