Re: How to get a java reference from a beanshell

Cristian Roldan <roldancer-/[email protected]>
Newsgroups gmane.comp.java.beanshell.devel
Message-ID <[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
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.