Load Java Class Definitions
MATLAB® loads a Java® class automatically when your code first uses it, for example, when you call its
constructor. To display a list of currently loaded Java classes, call the inmem
function. This function returns a list
of classes in the output argument J
. For example:
[~,~,j] = inmem; j
j = 2x1 cell array 'java.util.Date' 'com.mathworks.ide.desktop.MLDesktop'
MATLAB displays what is loaded on your system.
Note
When you call the which
function on methods defined by Java classes, the function only displays the classes currently loaded into the
MATLAB workspace. In contrast, which
displays MATLAB classes, whether or not they are loaded.