You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by gl...@apache.org on 2001/03/06 02:42:55 UTC

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup Bootstrap.java

glenn       01/03/05 17:42:55

  Modified:    catalina/src/share/org/apache/catalina/startup
                        Bootstrap.java
  Log:
  Add classes directory URL as last URL for ClassLoaders
  
  Revision  Changes    Path
  1.13      +58 -58    jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Bootstrap.java
  
  Index: Bootstrap.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Bootstrap.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- Bootstrap.java	2001/02/21 03:38:47	1.12
  +++ Bootstrap.java	2001/03/06 01:42:55	1.13
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Bootstrap.java,v 1.12 2001/02/21 03:38:47 glenn Exp $
  - * $Revision: 1.12 $
  - * $Date: 2001/02/21 03:38:47 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Bootstrap.java,v 1.13 2001/03/06 01:42:55 glenn Exp $
  + * $Revision: 1.13 $
  + * $Date: 2001/03/06 01:42:55 $
    *
    * ====================================================================
    *
  @@ -85,7 +85,7 @@
    * class path and therefore not visible to application level classes.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.12 $ $Date: 2001/02/21 03:38:47 $
  + * @version $Revision: 1.13 $ $Date: 2001/03/06 01:42:55 $
    */
   
   public final class Bootstrap {
  @@ -207,24 +207,6 @@
           // Construct the "class path" for this class loader
           ArrayList list = new ArrayList();
   
  -        File classes = new File(System.getProperty("catalina.home"),
  -                                "common/classes");
  -        if (classes.exists() && classes.canRead() &&
  -            classes.isDirectory()) {    
  -            try {
  -                URL url = new URL("file", null,
  -                                  classes.getCanonicalPath() + "/");
  -                if (debug >= 1)         
  -                    log("  Adding " + url.toString());
  -                list.add(url.toString());
  -            } catch (IOException e) {   
  -                System.out.println("Cannot create URL for " +
  -                                   classes.getAbsolutePath());
  -                e.printStackTrace(System.out);
  -                System.exit(1);         
  -            }
  -        }
  -
           File directory = new File(System.getProperty("catalina.home"),
                                     "common/lib");
           if (!directory.exists() || !directory.canRead() ||
  @@ -254,6 +236,24 @@
               }
           }
   
  +        File classes = new File(System.getProperty("catalina.home"),
  +                                "common/classes");
  +        if (classes.exists() && classes.canRead() &&
  +            classes.isDirectory()) {
  +            try {
  +                URL url = new URL("file", null,
  +                                  classes.getCanonicalPath() + "/");
  +                if (debug >= 1)
  +                    log("  Adding " + url.toString());
  +                list.add(url.toString());
  +            } catch (IOException e) {
  +                System.out.println("Cannot create URL for " +
  +                                   classes.getAbsolutePath());
  +                e.printStackTrace(System.out);
  +                System.exit(1);
  +            }
  +        }
  +
           // Construct the class loader itself
           String array[] = (String[]) list.toArray(new String[list.size()]);
           StandardClassLoader loader = new StandardClassLoader(array);
  @@ -275,24 +275,6 @@
           // Construct the "class path" for this class loader
           ArrayList list = new ArrayList();
   
  -        File classes = new File(System.getProperty("catalina.home"),
  -                                "server/classes");
  -        if (classes.exists() && classes.canRead() &&
  -            classes.isDirectory()) {
  -            try {
  -                URL url = new URL("file", null,
  -                                  classes.getCanonicalPath() + "/");
  -                if (debug >= 1)
  -                    log("  Adding " + url.toString());
  -                list.add(url.toString());
  -            } catch (IOException e) {
  -                System.out.println("Cannot create URL for " +
  -                                   classes.getAbsolutePath());
  -                e.printStackTrace(System.out);
  -                System.exit(1);
  -            }
  -        }
  -
           File directory = new File(System.getProperty("catalina.home"),
                                     "server/lib");
           if (!directory.exists() || !directory.canRead() ||
  @@ -319,6 +301,24 @@
               }
   	}
   
  +        File classes = new File(System.getProperty("catalina.home"),
  +                                "server/classes");                  
  +        if (classes.exists() && classes.canRead() &&                
  +            classes.isDirectory()) {                
  +            try {                                   
  +                URL url = new URL("file", null,
  +                                  classes.getCanonicalPath() + "/");
  +                if (debug >= 1)
  +                    log("  Adding " + url.toString());
  +                list.add(url.toString());
  +            } catch (IOException e) {
  +                System.out.println("Cannot create URL for " +
  +                                   classes.getAbsolutePath());
  +                e.printStackTrace(System.out);
  +                System.exit(1);
  +            }   
  +        }
  +
           // Construct the class loader itself
           String array[] = (String[]) list.toArray(new String[list.size()]);
           StandardClassLoader loader = new StandardClassLoader(array, parent);
  @@ -340,24 +340,6 @@
           // Construct the "class path" for this class loader
           ArrayList list = new ArrayList();
   
  -        File classes = new File(System.getProperty("catalina.home"),
  -                                "classes");
  -        if (classes.exists() && classes.canRead() &&
  -            classes.isDirectory()) {    
  -            try {
  -                URL url = new URL("file", null,
  -                                  classes.getCanonicalPath() + "/");
  -                if (debug >= 1)         
  -                    log("  Adding " + url.toString());
  -                list.add(url.toString());
  -            } catch (IOException e) {   
  -                System.out.println("Cannot create URL for " +
  -                                   classes.getAbsolutePath());
  -                e.printStackTrace(System.out);
  -                System.exit(1);         
  -            }
  -        }
  -
           File directory = new File(System.getProperty("catalina.home"),
                                     "lib");
           if (!directory.exists() || !directory.canRead() ||
  @@ -383,6 +365,24 @@
                   System.exit(1);
               }
   	}
  +
  +        File classes = new File(System.getProperty("catalina.home"),
  +                                "classes");                         
  +        if (classes.exists() && classes.canRead() &&                
  +            classes.isDirectory()) {                
  +            try {                                   
  +                URL url = new URL("file", null,
  +                                  classes.getCanonicalPath() + "/");
  +                if (debug >= 1)                                     
  +                    log("  Adding " + url.toString());              
  +                list.add(url.toString());             
  +            } catch (IOException e) {                 
  +                System.out.println("Cannot create URL for " +
  +                                   classes.getAbsolutePath());
  +                e.printStackTrace(System.out);                
  +                System.exit(1);                               
  +            }                                 
  +        }
   
           // Construct the class loader itself
           String array[] = (String[]) list.toArray(new String[list.size()]);