This is a static copy of a profile reportHome
javachk (33 calls, 0.000 sec)
Generated 15-Mar-2007 12:01:49 using real time.
M-function in file C:\Program Files\MATLAB71\toolbox\matlab\lang\javachk.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 |
55 | end | 33 | 0 s | 0% |  |
54 | err = err(zeros(0,1)); | 33 | 0 s | 0% |  |
53 | err.identifier = ''; | 33 | 0 s | 0% |  |
52 | err.message = ''; | 33 | 0 s | 0% |  |
51 | else | 33 | 0 s | 0% |  |
Other lines & overhead | | | 0 s | 0% |  |
Totals | | | 0.000 s | 0% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
usejava | M-function | 33 | 0 s | 0% |  |
Self time (built-ins, overhead, etc.) | | | 0 s | 0% |  |
Totals | | | 0.000 s | 0% | |
M-Lint results
No M-Lint messages.Coverage results
[ Show coverage for parent directory ]
Total lines in file | 55 |
Non-code lines (comments, blank lines) | 41 |
Code lines (lines that can run) | 14 |
Code lines that did run | 7 |
Code lines that did not run | 7 |
Coverage (did run/can run) | 50.00 % |
Function listing
time calls line
1 function err = javachk(requiredLevel, component)
2 %JAVACHK Validate level of Java support.
3 % MSG = JAVACHK(LEVEL) returns a generic error message if
4 % the required level of Java support is not available. If it
5 % is, it returns an empty matrix. The following levels of support
6 % 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 % MSG = JAVACHK(LEVEL, COMPONENT) returns an error message structure that
16 % names the affected COMPONENT if the required level of Java support
17 % is not available. If it is, it returns an empty structure. See example
18 % below.
19 %
20 % EXAMPLE:
21 % If you want to write an m-file that displays a Java Frame and want
22 % it to error gracefully if a Frame cannot be displayed, you can do
23 % the following:
24 %
25 % error(javachk('awt','myFile'));
26 % myFrame = java.awt.Frame;
27 % myFrame.setVisible(1);
28 %
29 % If a Frame cannot be displayed, the error will read:
30 % ??? myFile is not supported on this platform.
31 %
32 % See also USEJAVA, ERROR.
33
34 % Copyright 1984-2003 The MathWorks, Inc.
35 % $Revision: 1.7.4.3 $ $Date: 2004/07/16 18:35:23 $
36
37 % Check for valid argument list
33 38 error(nargchk(1, 2, nargin));
39
40 % If we're running at an insufficient level, report it. If no
41 % component name was supplied, make up a generic one.
33 42 if ~usejava(requiredLevel)
43 if nargin == 1
44 err.message = 'This feature is not supported because Java is not currently available.';
45 err.identifier = 'MATLAB:javachk:thisFeatureNotAvailable';
46 else
47 err.message = sprintf('%s is not supported because Java is not currently available.', ...
48 component);
49 err.identifier = 'MATLAB:javachk:featureNotAvailable';
50 end
33 51 else
33 52 err.message = '';
33 53 err.identifier = '';
33 54 err = err(zeros(0,1));
33 55 end