tf = usejava(feature) returns
logical 1 (true) if the specified
feature is supported. Otherwise, it returns logical 0 (false).
If the Java® feature is unavailable, then you can use this function
for error handling.
Use the following code snippet to test that
the AWT GUI components are available before attempting to display
a Java Frame. If the AWT is not available on your system, MATLAB® displays
the message Unable to open a Java Frame.
if usejava('awt')
myFrame = java.awt.Frame;
else
disp('Unable to open a Java Frame')
end
Use the following code snippet to terminate
a script if MATLAB does not have access to JVM® software.
The variable, filename, is a function
that contains Java code.
if ~usejava('jvm')
error([filename ' requires Java to run.'])
end
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window.
Web browsers do not support MATLAB commands.
Seleccione un país/idioma
Seleccione un país/idioma para obtener contenido traducido, si está disponible, y ver eventos y ofertas de productos y servicios locales. Según su ubicación geográfica, recomendamos que seleccione: .
También puede seleccionar uno de estos países/idiomas:
Cómo obtener el mejor rendimiento
Seleccione China (en idioma chino o inglés) para obtener el mejor rendimiento. Los sitios web de otros países no están optimizados para ser accedidos desde su ubicación geográfica.