On Sun, Jun 15, 2008 at 6:12 PM, alexander krohn <[EMAIL PROTECTED]> wrote: > alexander krohn schrieb: >> >> [...] >>> >>> No, because the Antlr files (at runtime only antlr-runtime-3.0.1.jar) has >>> the version number in it's name and is explicitely referenced in the >>> module's jar file, as mentioned above! >>> >> >> i don't think that a vm that runs argo would load different versions of >> the jars, since the modules won't run in different vm's with different >> classpaths. i think there's only one org.antlr.* namespace in the running >> vm, from the first or the last loaded jar that contains it, but that's pure >> speculation. >> >>>> [...] > > attached is a zip file with a test for this. the bla/Test.java is compiled > twice with different strings and the resulting classes are in new.jar and > old.jar. > > running "java -classpath old.jar;new.jar bla.Test" show the "old string", > reversing the jars in the classpath shows the other string. > > first come, first serve :\
That test uses a single classloader (the default initial classloader). We use a different classloader for every Jar in a module (although we should really use one per module rather than one per jar probably). Also, the namespace is only relevant while the classes are being loaded. Once they are loaded (ie the name is resolved), this doesn't come into play any more. I've got to run now and will be offline the rest of the day, but I'll try to follow up with more detail tomorrow. Tom --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
