Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@jakarta.apache.org Received: (qmail 13890 invoked by uid 500); 11 Aug 2001 05:33:49 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: tomcat-dev@jakarta.apache.org Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 13875 invoked from network); 11 Aug 2001 05:33:49 -0000 To: tomcat-dev@jakarta.apache.org Subject: [PATCH] TC4 "classes" dir not loaded on win Message-ID: <997508039.3b74c3c790dea@www.mhsoftware.com> Date: Fri, 10 Aug 2001 23:33:59 -0600 (MDT) From: Christopher Cain MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="-MOQ99750803996cfc1fba767769ec038b0875a4822a5" User-Agent: IMP/PHP IMAP webmail program 2.2.6 X-Originating-IP: 216.17.139.153 X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N ---MOQ99750803996cfc1fba767769ec038b0875a4822a5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit The {TC4_HOME}/server/classes directory, if created, fails to get added as a repository in the ClassLoader on Windows machines. The attached is a two-parter resolves the issue. I have tested the patch set on both Win98 and Linux, which in this case means that it will work on any other platforms as well. Enjoy! - Christopher ---MOQ99750803996cfc1fba767769ec038b0875a4822a5 Content-Type: text/plain; name="Bootstrap.patch"; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="Bootstrap.patch" --- catalina/src/share/org/apache/catalina/startup/Bootstrap.java Sun Jul 22 13:25:14 2001 +++ catalina/src/share/org/apache/catalina/startup/Bootstrap-new.java Fri Aug 10 18:01:44 2001 @@ -304,12 +304,12 @@ // Add the "server/classes" directory if it exists File classes = new File(System.getProperty("catalina.home"), - "server/classes"); + "server" + File.separator + "classes"); if (classes.exists() && classes.canRead() && classes.isDirectory()) { try { URL url = new URL("file", null, - classes.getCanonicalPath() + "/"); + classes.getCanonicalPath() + File.separator); if (debug >= 1) log(" Adding " + url.toString()); list.add(url.toString()); ---MOQ99750803996cfc1fba767769ec038b0875a4822a5 Content-Type: text/plain; name="StandardClassLoader.patch"; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="StandardClassLoader.patch" --- catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java Fri Aug 10 21:37:42 2001 +++ catalina/src/share/org/apache/catalina/loader/StandardClassLoader-new.java Fri Aug 10 21:37:56 2001 @@ -1192,7 +1192,7 @@ streamHandler = factory.createURLStreamHandler(protocol); // Validate the manifest of a JAR file repository - if (!repository.endsWith("/")) { + if (!repository.endsWith(File.separator)) { try { JarFile jarFile = null; Manifest manifest = null; ---MOQ99750803996cfc1fba767769ec038b0875a4822a5--