Re: Adding imports?
Darren Govoni <dgovoni-MiPnoaytyA1Wk0Htik3J/[email protected]> Thu, 20 Jan 2005 18:08:54 -0500
| Newsgroups | gmane.comp.java.beanshell.devel |
|---|---|
| Organization | metadapt LLC |
| Message-ID | <1106262534.17617.10.camel@samurai> |
I tried that and that doesn't work. It seems like it should. BTW, I have
to use interpreter.eval() on my script because it is in string format
only, not a URL or a file.
On Thu, 2005-01-20 at 05:57 -0700, Brian Hawkins wrote:
> I would try this. Before calling interpreter.source(file) on your
> script, call interpreter.eval("import java.io.*") or whatever it is you
> want to import.
>
> Brian
>
> Darren Govoni wrote:
>
> > Hi,
> > I was trying to do something I thought trivial. I want to load a
> > script into an interpreter instance, but I want to prime the
> > interpreter with import packages so the script doesn't have to. I
> > tried reloadPackages() with the 'new' packages the script will need,
> > but that didn't work. Any tips? I want to avoid manipulating the
> > script string to do this.
> >
> > thanks!
> > Darren
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
> Tool for open source databases. Create drag-&-drop reports. Save time
> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
> Download a FREE copy at http://www.intelliview.com/go/osdn_nl
> _______________________________________________
> Beanshell-developers mailing list
> Beanshell-developers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/beanshell-developers