Re: How to get a java reference from a beanshell

David Ward <[email protected]>
Newsgroups gmane.comp.java.beanshell.devel
Message-ID <[email protected]>
Try it and find out.  (Hint: the answer is yes.)


Mensaje citado por Cristian Roldan <roldancer-/[email protected]>:

> Hi David 
>     If I have my beanshell in a file , this code should be ...
>  
> Interpreter i = new Interpreter();
> Object myobj = new Object();
> i.set("myobj", myobj);
> i.source("myBeanShell.bsh");
>  
> Is this right ?
>  
> Thanks
> 
> 
> David Ward <[email protected]> wrote:
> Interpreter i = new Interpreter();
> Object myobj = new Object();
> i.set("myobj", myobj);
> i.eval("print(myobj);");
> 
> 
> Mensaje citado por Cristian Roldan :
> 
> > Hi All,
> > I'm thinking of coding a beanshell, I need to use a java object
> > defined outside of my beanshell (Embedding beanshell in java code) , how
> > could I do this ? my beanshell must use that javaobject.
> > If you have an example much better ..jejej
> > 
> > Thanks in advance.
> > 
> > 
> > 
> > ---------------------------------
> > ¿Buscás un auto?
> > Encontralo en Yahoo! Autos
> > ¡Más de 4000 clasificados todos los días!
> > Usados - 0 km - Vendé el tuyo
> 
> 
> ---------------------
> David Ward
> [email protected]
> http://www.dotech.com
> 
> 
> ---------------------------------
>  ¿Buscás un auto?
> Encontralo en Yahoo! Autos
> ¡Más de 4000 clasificados todos los días!
> Usados - 0 km - Vendé el tuyo


---------------------
David Ward
[email protected]
http://www.dotech.com


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.