diff scripts/java/javaaddpath.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
line wrap: on
line diff
--- a/scripts/java/javaaddpath.m
+++ b/scripts/java/javaaddpath.m
@@ -19,20 +19,17 @@
 
 ## -*- texinfo -*-
 ## @deftypefn {Function file} {} javaaddpath (@var{path})
-##
-## Adds @var{path} to the dynamic class path of the Java virtual
-## machine. @var{path} can be either a directory where .class files
-## can be found, or a .jar file containing Java classes.
-##
+## Add @var{path} to the dynamic class path of the Java virtual
+## machine.  @var{path} may be either a directory where @file{.class}
+## files are found, or a @file{.jar} file containing Java classes.
+## @seealso{javaclasspath}
 ## @end deftypefn
-## @seealso{javaclasspath}
 
 function javaaddpath (class_path)
 
   if (nargin != 1)
     print_usage ();
   else
-    % MH 30-08-2010: added tilde_expand to allow for specification of user's home
     new_path = canonicalize_file_name (tilde_expand (class_path));
     if (exist (new_path, "dir"))
       if (! strcmp (new_path (end), filesep))
@@ -42,6 +39,10 @@
       error ("invalid Java classpath: %s", class_path);
     endif
     success = java_invoke ("org.octave.ClassHelper", "addClassPath", new_path);
+
+    if (! success)
+      warning ("javaaddpath: failed to add '%s' to Java classpath", new_path);
+    endif
   endif 
    
 endfunction