I am a bit in a hurry to fix these bugs, I would be very grateful if
you could provide some hints or some pointers to implement or learn
about how to address them correctly.
Without going into the details, this is an application written in
Java/Jython that is able to execute programs written in Jython.
The first problem arises when the program uses an external library that
coincides whith some of the ones used by the application itself (for
instance two different versions of JDOM).
The second problem comes from the fact that while the application is
running the user can close a program and load another one. The external
libraries of the first one (appended to sys.path by the application
before the program is interpreted) should be "unloaded" so that the
external libraries of the second one can be loaded without conflicts
(assuming bug #1 is solved). How could it be accomplished?
On Jan 6, 2005, at 9:10 PM, Jeff Emanuel wrote:
> I think you need separate classloaders for each program. If the
> classloaders are
> distinct, then you shouldn't get conflicts between the programs.
Great, that sounds simple to integrate.
I am not familiar with class loaders at all, the steps the application
does now to run a program are:
1. append() program's external libraries to sys.path
2. create namespace dictionary
3. exec code in namespace
How should I modify that so that the exec'ed code loads its external
classes using another class loader?