home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 April / CMCD0404.ISO / Software / Shareware / Comunicatii / advwebrank / awr.msi / disk1.cab / bsh_1.2b6.jar / bsh / commands / getResource.bsh < prev    next >
Encoding:
Text File  |  2002-05-31  |  563 b   |  18 lines

  1. /**
  2.     Get a resource from the classpath.
  3.     Note: Currently this command does not take into account any BeanShell
  4.     modifications to the classpath, but in the future it will.
  5.     Currently this is the equivalent of calling getResource() on the 
  6.     interpreter class in the BeanShell package.  Use absolute paths to get 
  7.     items in the classpath.
  8. */
  9.  
  10. bsh.help.getResource = "usage: getResource( String name )";
  11.  
  12. import bsh.Interpreter;
  13.  
  14. URL getResource( String path ) {
  15.     //return this.interpreter.getClass().getResource(name);
  16.     return Interpreter.class.getResource(path);
  17. }
  18.