home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2007 June
/
PCWorld_2007-06_cd.bin
/
multimedia
/
ppsee
/
PPSeeSetup.exe
/
lib
/
bsh-commands-2.0b4.jar
/
bsh
/
commands
/
addClassPath.bsh
next >
Wrap
Text File
|
2005-05-23
|
658b
|
31 lines
/**
Add the specified directory or JAR file to the class path.
e.g.
<p>
<pre>
addClassPath( "/home/pat/java/classes" );
addClassPath( "/home/pat/java/mystuff.jar" );
addClassPath( new URL("http://myserver/~pat/somebeans.jar") );
</pre>
<p>
See <a href="classpath.html">Class Path Management</a>
@method void addClassPath( string | URL )
*/
bsh.help.addClassPath= "usage: addClassPath( string | URL )";
import java.net.URL;
import bsh.BshClassManager;
addClassPath( path ) {
URL url;
if ( path instanceof URL )
url = path;
else
url = pathToFile( path ).toURL();
this.caller.namespace.getClassManager().addClassPath( url );
}