jakarta-bsf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Victor J. Orlikowski" <...@dulug.duke.edu>
Subject Re: Dynamic Classpaths with BSF
Date Thu, 13 Feb 2003 10:34:28 GMT
On Fri, Jan 31, 2003 at 08:12:47PM +0530, Jiger Patel wrote:
> Funny. My Scripting app works fine using Beanshell. Does jython, javascript 
> etc engines ignore the ClassLoader that loaded them?? Since it works with 
> beanshell, ideally it should work for ALL scripting environments. Is there 
> any plan to make setClassPath compulsory for ENgines to implement. If it is 
> done so then such problems can be resolved easily.


As far as BSF is concerned, any class implementing the BSFEngine
interface should be aware of changes to the protected classLoader
and classPath variables that are defined in that interface, which
itself extends a PropertyChangeListener.

However, it may be the case that the individual language engines
do not necessarily check the classLoader variable for changes,
once they are loaded.

Most of the engines simply inherit the propertyChange() method
from BSFEngineImpl. In order for the setClassPath to necessarily
have an effect within the loaded scripting engine, the
propertyChange() method must be overridden within the given
language engine to notify the underlying environment of the

This is not something that can be enforced upon all engine
authors, but I would be willing to apply the changes to the
languages that are currently supported in BSF.

If you would be willing to submit patches to accomplish this, I
would be more than willing to apply them.

Victor J. Orlikowski   | The Wall is Down, But the Threat Remains!
orlikowski@apache.org  | vjo@dulug.duke.edu | vjo@us.ibm.com

View raw message