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.
Seleziona un sito web
Seleziona un sito web per visualizzare contenuto tradotto dove disponibile e vedere eventi e offerte locali. In base alla tua area geografica, ti consigliamo di selezionare: .
Puoi anche selezionare un sito web dal seguente elenco:
Come ottenere le migliori prestazioni del sito
Per ottenere le migliori prestazioni del sito, seleziona il sito cinese (in cinese o in inglese). I siti MathWorks per gli altri paesi non sono ottimizzati per essere visitati dalla tua area geografica.