Add entries to dynamic Java class path
one or more folders or Java® Archive (JAR) files to the beginning
of the current dynamic class path. Use the dynamic path when developing
and debugging your own Java classes.
clears the definitions of all Java classes defined by files on
the dynamic class path.
Add Folder to Dynamic Class Path
Display the current dynamic path. The output reflects your configuration.
DYNAMIC JAVA PATH <empty>
Add the current folder.
Display the updated dynamic path. The output reflects your current folder.
p = javaclasspath
p = 'c:\work\Java'
Append URL to Dynamic Class Path
javaaddpath('http://www.example.com','-end') p = javaclasspath
p = 'c:\work\Java' 'http://www.example.com'
dpath — Folder or JAR file
string | array
of strings | character vector | cell array of character vectors
Folder or JAR file, specified as a string, an array of strings, a character vector, or a 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.
MATLAB does not support JAR files generated by the MATLAB Compiler SDK™ product.
Use the dynamic path while you develop your own Java classes. After you develop and debug a Java class, add the class to the static path. For more information, see
To add folders to the static path, which MATLAB loads at startup, create a
javaclasspath.txtfile, as described in Static Path of Java Class Path.
javaaddpathdisplays the message
Not clearing Java, the dynamic path is updated, but you might need to type
clear javaso that MATLAB detects the new Java classes.
Introduced before R2006a