Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@apache.org Received: (qmail 47499 invoked from network); 1 Aug 2003 21:56:58 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 1 Aug 2003 21:56:58 -0000 Received: (qmail 22925 invoked by uid 97); 1 Aug 2003 21:59:39 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-dev@nagoya.betaversion.org Received: (qmail 22918 invoked from network); 1 Aug 2003 21:59:39 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 1 Aug 2003 21:59:39 -0000 Received: (qmail 46588 invoked by uid 500); 1 Aug 2003 21:56:46 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 46562 invoked from network); 1 Aug 2003 21:56:45 -0000 Received: from tarbolton.demon.co.uk (HELO killerbees.co.uk) (212.229.119.215) by daedalus.apache.org with SMTP; 1 Aug 2003 21:56:45 -0000 Received: from mailtest ([192.168.0.2]) by killerbees.co.uk (JAMES SMTP Server 3.0a1) with SMTP ID 883 for ; Fri, 1 Aug 2003 22:11:48 +0100 (BST) From: "Danny Angus" To: "Tomcat-Dev@Jakarta. Apache. Org" Subject: FW: JDK 1.4.2 and class loading Date: Fri, 1 Aug 2003 23:00:58 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I wonder if any tomcat guys have any insight they could share with us... > -----Original Message----- > From: Noel J. Bergman [mailto:noel@devtech.com] > Sent: 01 August 2003 20:02 > To: James-Dev Mailing List > Cc: Ted Neward; Jeroen Frijters > Subject: JDK 1.4.2 and class loading > > > Apparently, there has been a subtle change in JDK 1.4.2. Either > intentional > or accidental, but the URL: > > file://path/jarfile.jar > > does not appear to work under JDK 1.4.2, at least on Windows (the platform > where this was noticed and tested today). Instead, the following URL does > work: > > jar:file:path/jarfile.jar!/ > > Which means that the code in o.a.j.transport.Loader would change: > > - jarlist.add(new URL("file://" + baseDirectory + "/SAR-INF/lib/" + > flist[i] )); > + jarlist.add(new URL("jar:file:" + baseDirectory + "/SAR-INF/lib/" + > flist[i] + "!/")); > > This behavior is noted at > http://forum.java.sun.com/thread.jsp?forum=26&thread=408858&tstart > =0&trange= > 15. Does anyone have any additional information on this issue? I'm not > spotting anything in the docs, release notes or javadocs. > > Two related questions. Does anyone have any thoughts on the use of > > new URLClassLoader(URL[]) vs URLClassLoader.newInstance(URL[]) > > Most examples use the latter form. There are is a code difference related > to package security and exported packages. The current Java v1.4.2 > documentation > (http://java.sun.com/j2se/1.4.2/docs/guide/extensions/spec.html) don't go > into it, but there is some information on exported packages in a > cached copy > of some docs from an older beta > (http://kavosh.irost.net/books/jdk1.2beta3/docs/guide/extensions/s pec.html). This probably doesn't effect our use AT THE MOMENT, but I'm surprised to see the the operations aren't synonyms. Also, we've ran into some cases where: classLoader.loadClass(className); fails, whereas: Class.forName(className, true, classLoader) works. The best analysis I have found on the subject so far is Ted Neward's paper at http://www.javageeks.com/Papers/ClassForName/index.html, but he doesn't really go too far into the details of WHY the latter behaves differently, other than acknowledging that it does. --- Noel --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org For additional commands, e-mail: server-dev-help@james.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org