Re: [tcljava-dev] JACL classloader bug & fix
Brought to you by:
mdejong
From: Mo D. <md...@un...> - 2003-06-23 05:21:55
|
On Tue, 17 Jun 2003 14:16:11 -0600 "Sasvata (Shash) Chatterjee" <sa...@ba...> wrote: > > Hi, > > Found a classloader bug while using JACL under Jakarta-BSF under Keel > Metaframework. BSF was loaded with a custom classloader, found JACL classes > but could not load init.tcl (unless jacl.jar was put in the $JRE/lib/ext). > > The problem is that instead of loading the resource from the classloader that > loaded the "Interp", it is loading the resource from the classloader which > loaded "Class". > > The method evalResource(String resName) in tcl.lang.Interp.java, line 2394 > needs to change: > > from: stream = Class.class.getResourceAsStream(resName); > to : stream = getClass().getResourceAsStream(resName); Are you using the 1.3.0 release of Jacl? The code in question looks like this in the current release: stream = Interp.class.getResourceAsStream(resName); I can only assume that you must be using an old release which is why you are running into this problem. If you switch to the 1.3.0 release does the problem go away? Mo |