Input Arguments

Folder or JAR file, specified as a character vector or cell
array of character vectors, to add to the dynamic path. When you add
a folder to the path, MATLAB® includes all files in that folder
as part of the path.

Data Types: char | cell

Limitations

MATLAB does not support JAR files generated by
the MATLAB Compiler SDK™ product.

More About

Tips

MATLAB provides the dynamic path as a convenience
for when you develop your own Java classes. Although the dynamic
path offers flexibility in changing the path, Java classes on
the dynamic path might load more slowly than classes on the static
path. Also, classes on the dynamic path might not behave the same
as classes on the static path. If your class does not behave as expected,
use the static path.

After you develop and debug a Java class, add the class
to the static path.

This command clears the definitions of all Java classes
defined by files on the dynamic class path.

To add folders to the static path, which MATLAB loads
at startup, create a javaclasspath.txt file, as
described in Static Path.