--- Simon Kitching <[EMAIL PROTECTED]> wrote: > Hmm..you're quite right. The problem is not > "getContextClassLoader", but > there *is* a problem with AccessController. > > I've checked the svn/cvs history, and the > AccessController stuff was > added by Richard Sitze in r138923 on 2002-10-18. > Presumably that was the > date at which JCL no longer worked on java1.1. > > Given that there have been no complaints about that, > should we assume > that JCL for java-1.1 is not in great demand, and > explicitly support > only 1.3 or later? I see no reason to support 1.2, > as it is well > out-of-date; 1.1 has *some* justification as many > Win9x systems shipped > with this jvm version and still are in use (see the > user request which > started this discussion). > > ALternatively, we can simply test for 1.1 before > attempting to use the > AccessController stuff... >
Random thoughts.... 1) Found a brief discussion on this list a month ago that touched on issues with JDK detection: http://marc.theaimsgroup.com/?l=jakarta-commons-dev&m=111049144008136&w=2 2) My experience is that the JVM will not try to load a class until it is needed, so even though AccessController and PrivilegedAction are imported, LogFactory/LogFactoryImpl/SimpleLogcan be loaded. In the test I ran the NoClassDefFoundError is thrown when an attempt is made to use PrivilegedAction, not when LogFactory is loaded. So, *potentially* the error can be caught and handled or just avoided via JDK detection. The concern I have is that this "lazy loading" of classes is not required in the spec (see http://java.sun.com/docs/books/vmspec/2nd-edition/html/Concepts.doc.html#22574 ). Some JVMs (e.g. the M$ JVM used in Win9x browsers) *may* try to link all classes when LogFactory is loaded, in which case JDK detection won't work unless we use reflection for the AccessController stuff. Reflection sounds pretty nasty. (Is it even possible for anonymous inner classes? Don't know how it could be.) 3) Did a little archeology and it looks like JCL 1.0.1 was cut about a week before the AccessController stuff was added. So that's the last release that ran on JDK 1.1. 4) Throwing in my own 2 cents, I think of JCL as being targetted to component/library/framework developers. I don't expect there are many applets being written that target 1.1 and also incorporate the kinds of libraries that use JCL. Brian __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
