This is a static copy of a profile reportHome
usejava (37 calls, 0.000 sec)
Generated 15-Mar-2007 12:01:49 using real time.
M-function in file C:\Program Files\MATLAB71\toolbox\matlab\general\usejava.m
[Copy to new window for comparing multiple runs]
Parents (calling functions)
Lines where the most time was spent
No measurable time spent in this functionLine Number | Code | Calls | Total Time | % Time | Time Plot |
45 | isok = system_dependent('useJa... | 37 | 0 s | 0% |  |
44 | error(nargchk(1,1,nargin)); | 37 | 0 s | 0% |  |
Other lines & overhead | | | 0 s | 0% |  |
Totals | | | 0.000 s | 0% | |
Children (called functions)
No childrenM-Lint results
No M-Lint messages.Coverage results
[ Show coverage for parent directory ]
Total lines in file | 45 |
Non-code lines (comments, blank lines) | 43 |
Code lines (lines that can run) | 2 |
Code lines that did run | 2 |
Code lines that did not run | 0 |
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 an m-file 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 an m-file 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-2004 The MathWorks, Inc.
42 % $Revision: 1.6.4.2 $ $Date: 2005/06/27 22:48:21 $
43
37 44 error(nargchk(1,1,nargin));
37 45 isok = system_dependent('useJava',feature);