[tcljava-dev] JACL classloader bug & fix
Brought to you by:
mdejong
From: Sasvata (S. C. <sa...@ba...> - 2003-06-17 20:16:25
|
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); In a similar vein, TclJava's tcl.lang.JavaDefineClassCmd.java (lines 58-59) and tcl.lang.JavaInvoke.java (line 384) have the same problem. Shash |