remm 2003/10/10 05:16:37 Modified: catalina/src/share/org/apache/catalina/startup Bootstrap.java Log: - Small tweaks to allow to execute the bootstrap JAR. This won't set any endorsed properties (maybe there's an entry for that in the manifest, but I don't know it), but could be useful. Revision Changes Path 1.13 +22 -4 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/Bootstrap.java Index: Bootstrap.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/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 23 Sep 2003 13:43:18 -0000 1.12 +++ Bootstrap.java 10 Oct 2003 12:16:37 -0000 1.13 @@ -380,7 +380,10 @@ } try { - String command = args[0]; + String command = "start"; + if (args.length > 0) { + command = args[0]; + } if (command.equals("startd")) { args[0] = "start"; daemon.load(args); @@ -436,8 +439,23 @@ if (System.getProperty("catalina.home") != null) return; - System.setProperty("catalina.home", - System.getProperty("user.dir")); + File bootstrapJar = + new File(System.getProperty("user.dir"), "bootstrap.jar"); + if (bootstrapJar.exists()) { + try { + System.setProperty + ("catalina.home", + (new File(System.getProperty("user.dir"), "..")) + .getCanonicalPath()); + } catch (Exception e) { + // Ignore + System.setProperty("catalina.home", + System.getProperty("user.dir")); + } + } else { + System.setProperty("catalina.home", + System.getProperty("user.dir")); + } }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]