Documentation Center

  • Trials
  • Product Updates

Call Java Libraries

Access Java® libraries from MATLAB®

Start Here

Use one of the following to call methods on Java objects:

  • % MATLAB syntax
    method(object,arg1,...,argn) 
  • /* Java syntax */
    object.method(arg1,...,argn) 
  • % Method name exceeds maximum length of MATLAB identifier
    javaMethod(method,object,arg1,...,argn) 

Functions

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

Classes

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