This is a static copy of a profile report

Home

usejava (Calls: 24, Time: 0.001 s)
Generated 16-Jul-2020 17:08:39 using performance time.
function in file /Applications/MATLAB_R2020a.app/toolbox/matlab/general/usejava.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
graphicsAndGuisfunction4
...t;ToolbarController.ToolbarControllerclass method10
...>PostUpdatePlugin.PostUpdatePluginclass method10
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
44
isok = system_dependent('useJa...
240.001 s68.8%
43
narginchk(1,1);
240.000 s0.7%
All other lines  0.000 s30.5%
Totals  0.001 s100% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function44
Non-code lines (comments, blank lines)42
Code lines (lines that can run)2
Code lines that did run2
Code lines that did not run0
Coverage (did run/can run)100.00 %
Function listing
time 
Calls 
 line
   1 
function isok = usejava(feature)
   2 
%USEJAVA  True if the specified Java feature is supported in MATLAB.
   3 
%   USEJAVA(LEVEL) returns 1 if the feature is supported and 
   4 
%   0 otherwise.
   5 
%
   6 
%   The following levels of support exist:
   7 
%
   8 
%   LEVEL      MEANING
   9 
%   -----------------------------------------------------
  10 
%   'jvm'      The Java Virtual Machine is running.
  11 
%   'awt'      AWT components are available.
  12 
%   'swing'    Swing components are available.
  13 
%   'desktop'  The MATLAB interactive desktop is running.
  14 
%
  15 
%   "AWT components" refers to Java's GUI components in the Abstract 
  16 
%   Window Toolkit.  "Swing components" refers to Java's lightweight 
  17 
%   GUI components in the Java Foundation Classes.
  18 
%
  19 
%   EXAMPLES:
  20 
%
  21 
%   If you want to write a MATLAB program that displays a Java Frame and want
  22 
%   to be robust to the case when there is no display set or no JVM
  23 
%   available, you can do the following:
  24 
%   
  25 
%   if usejava('awt')
  26 
%      myFrame = java.awt.Frame;
  27 
%   else
  28 
%      disp('Unable to open a Java Frame.');
  29 
%   end
  30 
%
  31 
%   If you want to write a MATLAB program that uses Java code and want it to
  32 
%   fail gracefully when run in a MATLAB session that does not have access
  33 
%   to a JVM, you can add the following check:
  34 
%
  35 
%   if ~usejava('jvm')
  36 
%      error([mfilename ' requires Java to run.']);
  37 
%   end
  38 
%
  39 
%   See also JAVACHK
  40 

  41 
%   Copyright 1984-2011 The MathWorks, Inc.
  42 

< 0.001 
     24 
  43
narginchk(1,1); 
< 0.001 
     24 
  44
isok = system_dependent('useJava',feature); 

Other subfunctions in this file are not included in this listing.