remm 01/08/28 18:27:37
Modified: catalina/src/share/org/apache/catalina/startup
Bootstrap.java
Log:
- If it does not exist, the value of catalina.home should also be the value
of user.dir.
Revision Changes Path
1.24 +19 -14
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.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- Bootstrap.java 2001/08/15 00:55:25 1.23
+++ Bootstrap.java 2001/08/29 01:27:36 1.24
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Bootstrap.java,v
1.23 2001/08/15 00:55:25 craigmcc Exp $
- * $Revision: 1.23 $
- * $Date: 2001/08/15 00:55:25 $
+ * $Header:
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Bootstrap.java,v
1.24 2001/08/29 01:27:36 remm Exp $
+ * $Revision: 1.24 $
+ * $Date: 2001/08/29 01:27:36 $
*
* ====================================================================
*
@@ -85,7 +85,7 @@
* class path and therefore not visible to application level classes.
*
* @author Craig R. McClanahan
- * @version $Revision: 1.23 $ $Date: 2001/08/15 00:55:25 $
+ * @version $Revision: 1.24 $ $Date: 2001/08/29 01:27:36 $
*/
public final class Bootstrap {
@@ -237,7 +237,7 @@
ArrayList list = new ArrayList();
// Add the "common/classes" directory if it exists
- File classes = new File(System.getProperty("catalina.home"),
+ File classes = new File(getCatalinaHome(),
"common" + File.separator + "classes");
if (classes.exists() && classes.canRead() &&
classes.isDirectory()) {
@@ -256,8 +256,7 @@
}
// Add all JAR files in the "common/lib" directory if it exists
- File directory = new File(System.getProperty("catalina.home"),
- "common/lib");
+ File directory = new File(getCatalinaHome(), "common/lib");
if (!directory.exists() || !directory.canRead() ||
!directory.isDirectory()) {
System.out.println("Directory " + directory.getAbsolutePath()
@@ -313,7 +312,7 @@
ArrayList list = new ArrayList();
// Add the "server/classes" directory if it exists
- File classes = new File(System.getProperty("catalina.home"),
+ File classes = new File(getCatalinaHome(),
"server" + File.separator + "classes");
if (classes.exists() && classes.canRead() &&
classes.isDirectory()) {
@@ -332,8 +331,7 @@
}
// Add all JAR files in the "server/lib" directory if it exists
- File directory = new File(System.getProperty("catalina.home"),
- "server/lib");
+ File directory = new File(getCatalinaHome(), "server/lib");
if (!directory.exists() || !directory.canRead() ||
!directory.isDirectory()) {
System.out.println("Directory " + directory.getAbsolutePath()
@@ -387,8 +385,7 @@
ArrayList list = new ArrayList();
// Add the "classes" directory if it exists
- File classes = new File(System.getProperty("catalina.home"),
- "classes");
+ File classes = new File(getCatalinaHome(), "classes");
if (classes.exists() && classes.canRead() &&
classes.isDirectory()) {
try {
@@ -406,8 +403,7 @@
}
// Add all JAR files in the "lib" directory if it exists
- File directory = new File(System.getProperty("catalina.home"),
- "lib");
+ File directory = new File(getCatalinaHome(), "lib");
if (!directory.exists() || !directory.canRead() ||
!directory.isDirectory()) {
System.out.println("Directory " + directory.getAbsolutePath()
@@ -453,6 +449,15 @@
return (loader);
+ }
+
+
+ /**
+ * Get the value of the catalina.home environment variable.
+ */
+ private static String getCatalinaHome() {
+ return System.getProperty("catalina.home",
+ System.getProperty("user.dir"));
}