User`s manual

5 Calling Java from MATLAB
5-8
When you use the which function on methods defined by Java classes, the
function only acts on the classes currently loaded into the MATLAB working
environment. In contrast,
which always operates on MATLAB classes, whether
or not they are loaded.
Determining Which Classes Are Loaded
At any time during a MATLAB session, you can obtain a listing of all the Java
classes that are currently loaded. To do so, you use the
inmem function, in the
following form.
[M,X,J] = inmem
This function returns the list of Java classes in output argument J. (It also
returns in
M the names of all currently loaded M-files, and in X the names of all
currently loaded MEX-files.)
Here’s a sample of output from the
inmem function.
[m,x,j] = inmem
m =
'isequal'
'isunix'
'fullfile'
'filesep'
.
.
.
'matlabrc'
x =
'getprofl'
j =
'java.awt.Frame'
'com.mathworks.ide.desktop.MLDesktop'
Simplifying Java Class Names
Your MATLAB commands can refer to any Java class by its fully qualified
name, which includes its package name. For example, the following are fully
qualified names: