Trivial question about initial script sourced automatically for every JConsole.
Gena Batsyan <[email protected]> Mon, 21 Mar 2011 17:11:04 +0200
| Newsgroups | gmane.comp.java.beanshell.user |
|---|---|
| Message-ID | <[email protected]> |
Hi everybody!
I've got a small probably trivial problem with beanshell
I'm trying to embed beanshell into my application by doing simple
bsh.Interpreter i = new bsh.Interpreter();
i.eval("desktop()");
what I'm trying to do is to source an initial file into the interpreter
so that the stuff defined therein is available immediately in any shell
created in the desktop, and it just does not work.
I've tried different things
1) before/after evaling desktop() in the code above I tried
i.source("/pathto/boot.bsh");
2) modified makeWorkspace() command in the distribution so that
this.interpreter = new Interpreter( console );
+ this.interpreter.source("/pathto/boot.bsh");
the functions defined in /pathto/boot.bsh are simply not there.
However if i do source("/pathto/boot.bsh"); within the shell (in the
desktop), everything is fine.
It's pretty annoying pasting this every time, I would appreciate if
anyone would have a suggestion...
Thanks in advance!
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d