If I'm not mistaken, BeanShell simply pre-imports certain packages (java.lang.*, java.util.*, java.io.*?).
 
Alexey
http://azinger.blogspot.com
http://bsheet.sourceforge.net
http://wcollage.sourceforge.net



From: "VVenkataKrishnan@inautix.co.in" <VVenkataKrishnan@inautix.co.in>
To: beanshell-developers@lists.sourceforge.net
Sent: Thu, August 19, 2010 12:35:56 AM
Subject: [Beanshell-dev] Class loading


Hei,

Interpreter i = new Interpreter();
i.eval("String s = new String(\"Hello World!\");");

In the above Java statement i wish to know how the beanshell invokes the class "String" without its package being specified. How does it associates the namespace.

I have a small requirement like this, to dynamically invoke simple Java statements and invoke Java classes dynamically. I have a small interpreter developed for this. As the requirement is urgent, although i had read few sources of beanshell i would like to get the answer from the experienced than by finding all my myself.

Thanks

V