home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Freelog Special Freeware 25
/
FreelogHS25.iso
/
Dessin
/
ArtOfIllusion2.2.1
/
ArtOfIllusion.jar
/
bsh
/
commands
/
importCommands.bsh
< prev
next >
Wrap
Text File
|
2005-05-23
|
1KB
|
40 lines
/**
Import scripted or compiled BeanShell commands in the following package
in the classpath. You may use either "/" path or "." package notation.
e.g.
<pre>
// equivalent
importCommands("/bsh/commands")
importCommands("bsh.commands")
<pre>
When searching for a command each path will be checked for first, a file
named 'command'.bsh and second a class file named 'command'.class.
<p/>
You may add to the BeanShell classpath using the addClassPath() or
setClassPath() commands and then import them as usual.
<pre>
addClassPath("mycommands.jar");
importCommands("/mypackage/commands");
</pre>
<p/>
If a relative path style specifier is used then it is made into an absolute
path by prepending "/". Later imports take precedence over earlier ones.
<p/>
Imported commands are scoped just like imported clases.
<p/>
@method void importCommands( resource path | package name )
*/
bsh.help.importCommands = "usage: importCommands( string )";
importCommands( path )
{
this.caller.namespace.importCommands( path );
}