
bsh.commands.source.bsh Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bsh-console Show documentation
Show all versions of bsh-console Show documentation
A BeanShell console with history, autocompletion and more...
The newest version!
/**
Read filename into the interpreter and evaluate it in the current
namespace. Like the Bourne Shell "." command.
This command acts exactly like the eval() command but reads from a file
or URL source.
@see eval() for more information.
@throws bsh.EvalError or bsh.TargetError on errors in the sourced script.
*/
import java.net.URL;
bsh.help.source = "usage: source( filename | URL )";
Object source(String filename) {
return (new bsh.Utils()).source(this.interpreter, pathToFile(filename), this.caller.namespace);
}
Object source(URL url) {
return (new bsh.Utils()).source(this.interpreter, pathToFile(url.file), this.caller.namespace);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy