W3C home > Mailing lists > Public > www-jigsaw@w3.org > January to February 1999

Re: JDK 1.2 classloader bug!

From: Francis Upton <francis@forte.com>
Date: Wed, 20 Jan 1999 12:51:44 -0500 (EST)
Message-Id: <3.0.5.32.19990120095044.00b5b6e0@mail.forte.com>
To: Yves Lafon <ylafon@w3.org>, Wolfgang Platzer <Wolfgang.Platzer@iaik.tu-graz.ac.at>
Cc: Jigsaw Mailinglist <www-jigsaw@w3.org>
I ran an earlier version of Jigsaw with JDK 1.2 by using the -noverify flag
and it seemed to work.

Francis

At 02:29 PM 1/20/99 +0100, Yves Lafon wrote:
>On Wed, 20 Jan 1999, Wolfgang Platzer wrote:
>
>> 
>> I think I encountered the NT JDK 1.2 classloader bug within my application.
>> Can someone point me to additional information or can tell me a workaround?
>
>    // This is a nasty kludge due to a bug in jdk1.2 on NT
>    // this.cls = Class.forName(clsname, true,
>    //                          this.getClass().getClassLoader());
>    // works and not
>    // this.cls    = Class.forName(clsname);
>    // even if it is exactly the same thing :)
>    // and the creation of a new object is enough to make it run...
>   this.cls.newInstance();
>
>In fact the culprit  is the native method
>ClassLoader.getCallerClassLoader(); 
>It doesn't work as this.getClass().getClassLoader();
>The workaround  ( this.cls.newInstance(); ) work for an unknown reason!
>(thanks to Thomas Kopp for this workaround that keeps jdk1.1
>compatibility)
>Regards,
>
>      /\          - Yves Lafon - World Wide Web Consortium - 
>  /\ /  \        Architecture Domain - Jigsaw Activity Leader
> /  \    \/\    
>/    \   /  \   http://www.w3.org/People/Lafon - ylafon@w3.org    
>
>
>
>
>
Received on Wednesday, 20 January 1999 13:19:22 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:28 GMT