Mercurial > hg > octave-nkf
comparison scripts/java/javarmpath.m @ 15748:54e8c2527a9e
style and doc fixes for newly imported Java package .m files
* java/cell2mlstr.m, java/errordlg.m, java/helpdlg.m, java/inputdlg.m,
java/javaArray.m, java/javaaddpath.m, java/javaclasspath.m,
java/javafields.m, java/javamem.m, java/javamethods.m,
java/javarmpath.m, java/listdlg.m, java/msgbox.m java/questdlg.m,
java/warndlg.m: Style and doc fixes.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 07 Dec 2012 17:21:27 -0500 |
parents | da26f72408a7 |
children | 0f1a143e5002 |
comparison
equal
deleted
inserted
replaced
15747:4be890c5527c | 15748:54e8c2527a9e |
---|---|
17 ## along with Octave; see the file COPYING. If not, see | 17 ## along with Octave; see the file COPYING. If not, see |
18 ## <http://www.gnu.org/licenses/>. | 18 ## <http://www.gnu.org/licenses/>. |
19 | 19 |
20 ## -*- texinfo -*- | 20 ## -*- texinfo -*- |
21 ## @deftypefn {Function file} {} javarmpath (@var{path}) | 21 ## @deftypefn {Function file} {} javarmpath (@var{path}) |
22 ## | 22 ## Remove @var{path} from the dynamic class path of the Java virtual |
23 ## Removes @var{path} from the dynamic class path of the Java virtual | 23 ## machine. @var{path} may be either a directory where @file{.class} |
24 ## machine. @var{path} can be either a directory where .class files | 24 ## files are found, or a @file{.jar} file containing Java classes. |
25 ## can be found, or a .jar file containing Java classes. | 25 ## @seealso{javaaddpath, javaclasspath} |
26 ## | |
27 ## @end deftypefn | 26 ## @end deftypefn |
28 ## @seealso{javaaddpath,javaclasspath} | |
29 | 27 |
30 function javarmpath (class_path) | 28 function javarmpath (class_path) |
31 | 29 |
32 if (nargin != 1) | 30 if (nargin != 1) |
33 print_usage (); | 31 print_usage (); |
34 else | 32 else |
35 % MH 30-08-2010: added tilde_expand to allow for specification of user's home | 33 old_path = canonicalize_file_name (tilde_expand (class_path)); |
36 old_path = canonicalize_file_name (tilde_expand(class_path)); | |
37 if (exist (old_path, "dir")) | 34 if (exist (old_path, "dir")) |
38 if (! strcmp (old_path (end), filesep)) | 35 if (! strcmp (old_path (end), filesep)) |
39 old_path = [old_path, filesep]; | 36 old_path = [old_path, filesep]; |
40 end | 37 endif |
41 end | 38 endif |
42 success = java_invoke ('org.octave.ClassHelper', 'removeClassPath', old_path); | 39 |
40 success = java_invoke ("org.octave.ClassHelper", "removeClassPath", | |
41 old_path); | |
42 | |
43 if (! success) | 43 if (! success) |
44 disp (['Warning: ', old_path, ' not found in Java classpath.', 10]); | 44 warning ("javarmpath: %s: not found in Java classpath", old_path); |
45 end | 45 endif |
46 end | 46 endif |
47 | 47 |
48 end | 48 endfunction |