Add entries to dynamic Java class path
Display the current dynamic path.
DYNAMIC JAVA PATH <empty>
The output reflects your configuration.
Add the current folder.
Display the dynamic path.
p = javaclasspath
p = 'c:\work\Java'
The output reflects your current folder.
javaaddpath('http://www.example.com','-end') p = javaclasspath
p = 'c:\work\Java' 'http://www.example.com'
MATLAB calls the clear java command whenever you change the dynamic path. This command clears the definitions of all Java classes defined by files on the dynamic class path, removes all global variables and variables from the base workspace, and removes all compiled scripts, functions, and MEX-functions from memory.
To add folders to the static path, which MATLAB loads at startup, create a javaclasspath.txt file, as described in The Static Path.