# Class Bootstrap

java.lang.Object
org.apache.catalina.startup.Bootstrap

public final class Bootstrap extends Object
Bootstrap loader for Catalina. This application constructs a class loader for use in loading the Catalina internal classes (by accumulating all of the JAR files found in the "server" directory under "catalina.home"), and starts the regular execution of the container. The purpose of this roundabout approach is to keep the Catalina internal classes (and any other classes they depend on, such as an XML parser) out of the system class path and therefore not visible to application level classes.

Author:
  Craig R. McClanahan, Remy Maucherat

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Bootstrap()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `destroy()`
  Destroy the Catalina Daemon.
  `boolean`
  `getAwait()`
  `static String`
  `getCatalinaBase()`
  Obtain the name of the configured base (instance) directory.
  `static File`
  `getCatalinaBaseFile()`
  Obtain the configured base (instance) directory.
  `static String`
  `getCatalinaHome()`
  Obtain the name of configured home (binary) directory.
  `static File`
  `getCatalinaHomeFile()`
  Obtain the configured home (binary) directory.
  `void`
  `init()`
  Initialize daemon.
  `void`
  `init(String[] arguments)`
  Load the Catalina daemon.
  `static void`
  `main(String[] args)`
  Main method and entry point when starting Tomcat via the provided scripts.
  `void`
  `setAwait(boolean await)`
  Set flag.
  `void`
  `start()`
  Start the Catalina daemon.
  `void`
  `stop()`
  Stop the Catalina Daemon.
  `void`
  `stopServer()`
  Stop the standalone server.
  `void`
  `stopServer(String[] arguments)`
  Stop the standalone server.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Bootstrap

    public Bootstrap()

- ## Method Details

  - ### init

    public void init() throws Exception
    Initialize daemon.
    Throws:
      `Exception` - Fatal initialization error

  - ### init

    public void init(String[] arguments) throws Exception
    Load the Catalina daemon.
    Parameters:
      `arguments` - Initialization arguments
    Throws:
      `Exception` - Fatal initialization error

  - ### start

    public void start() throws Exception
    Start the Catalina daemon.
    Throws:
      `Exception` - Fatal start error

  - ### stop

    public void stop() throws Exception
    Stop the Catalina Daemon.
    Throws:
      `Exception` - Fatal stop error

  - ### stopServer

    public void stopServer() throws Exception
    Stop the standalone server.
    Throws:
      `Exception` - Fatal stop error

  - ### stopServer

    public void stopServer(String[] arguments) throws Exception
    Stop the standalone server.
    Parameters:
      `arguments` - Command line arguments
    Throws:
      `Exception` - Fatal stop error

  - ### setAwait

    public void setAwait(boolean await) throws Exception
    Set flag.
    Parameters:
      `await` - `true` if the daemon should block
    Throws:
      `Exception` - Reflection error

  - ### getAwait

    public boolean getAwait() throws Exception
    Throws:
      `Exception`

  - ### destroy

    public void destroy()
    Destroy the Catalina Daemon.

  - ### main

    public static void main(String[] args)
    Main method and entry point when starting Tomcat via the provided scripts.
    Parameters:
      `args` - Command line arguments to be processed

  - ### getCatalinaHome

    public static String getCatalinaHome()
    Obtain the name of configured home (binary) directory. Note that home and base may be the same (and are by default).
    Returns:
      the catalina home

  - ### getCatalinaBase

    public static String getCatalinaBase()
    Obtain the name of the configured base (instance) directory. Note that home and base may be the same (and are by default). If this is not set the value returned by `getCatalinaHome()` will be used.
    Returns:
      the catalina base

  - ### getCatalinaHomeFile

    public static File getCatalinaHomeFile()
    Obtain the configured home (binary) directory. Note that home and base may be the same (and are by default).
    Returns:
      the catalina home as a file

  - ### getCatalinaBaseFile

    public static File getCatalinaBaseFile()
    Obtain the configured base (instance) directory. Note that home and base may be the same (and are by default). If this is not set the value returned by `getCatalinaHomeFile()` will be used.
    Returns:
      the catalina base as a file