Package com.xmlmind.w2x.processor

## Class Start

- java.lang.Object
- - com.xmlmind.w2x.processor.Start

-     public class Start
      extends Object

  Starts the `w2x` command-line tool, taking into account possible plugins.

  For this, `Start` class scans the directories specifed in system property or environment variable `W2X_PLUGIN_PATH`, searching for `.jar` files (containing custom `ProcessStep` code or some support code) and for `.w2x_plugin` files (containing plugin specifications).

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected ArrayList<String>` | `errorList` |
    `protected ArrayList<URL>` | `jarList` |
    `static String` | `PLUGIN_SUFFIX` |
    `protected ArrayList<URL>` | `pluginList` |

  - ### Constructor Summary

    Constructors
    Modifier | Constructor | Description
    --- | --- | ---
    `protected` | `Start()` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected Object` | `createApp​(ClassLoader classLoader, String appClassName, File installDir)` |
    `protected ClassLoader` | `createClassLoader()` |
    `protected void` | `doStart​(ClassLoader classLoader, String appClassName, File installDir, String[] args)` |
    `static File` | `findInstallDir()` | Search the `CLASSPATH` for `w2x.jar` or `w2x_all.jar` or `w2x_app.jar` to determine the location of the installation directory of XMLmind Word To XML.
    `protected URL[]` | `getClassPath()` |
    `protected String[]` | `getErrors()` |
    `protected URL[]` | `getJars()` |
    `protected URL[]` | `getPlugins()` |
    `static void` | `main​(String[] args)` |
    `protected static void` | `prependClasspath​(List<URL> jarList)` |
    `protected void` | `runApp​(Object app, String[] args)` |
    `static void` | `scanPluginDir​(File dir, List<URL> jarList, List<URL> pluginList, List<String> errorList)` |
    `static void` | `scanPluginDirs​(File installDir, List<URL> jarList, List<URL> pluginList, List<String> errorList)` |
    `protected void` | `start​(String appClassName, String[] args)` |

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

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

- - ### Field Detail

    - #### jarList

          protected ArrayList<URL> jarList

    - #### pluginList

          protected ArrayList<URL> pluginList

    - #### errorList

          protected ArrayList<String> errorList

    - #### PLUGIN_SUFFIX

          public static final String PLUGIN_SUFFIX

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### Start

          protected Start()

  - ### Method Detail

    - #### main

          public static void main​(String[] args)

    - #### start

          protected void start​(String appClassName,
                               String[] args)

    - #### doStart

          protected void doStart​(ClassLoader classLoader,
                                 String appClassName,
                                 File installDir,
                                 String[] args)

    - #### createClassLoader

          protected ClassLoader createClassLoader()

    - #### getClassPath

          protected URL[] getClassPath()

    - #### prependClasspath

          protected static final void prependClasspath​(List<URL> jarList)

    - #### getJars

          protected URL[] getJars()

    - #### createApp

          protected Object createApp​(ClassLoader classLoader,
                                     String appClassName,
                                     File installDir)
                              throws Exception

      Throws:
        `Exception`

    - #### getPlugins

          protected URL[] getPlugins()

    - #### getErrors

          protected String[] getErrors()

    - #### runApp

          protected void runApp​(Object app,
                                String[] args)
                         throws Exception

      Throws:
        `Exception`

    - #### findInstallDir

          public static File findInstallDir()

      Search the `CLASSPATH` for `w2x.jar` or `w2x_all.jar` or `w2x_app.jar` to determine the location of the installation directory of XMLmind Word To XML.
      Returns:
        installation directory if found; `null` otherwise

    - #### scanPluginDirs

          public static final void scanPluginDirs​(File installDir,
                                                  List<URL> jarList,
                                                  List<URL> pluginList,
                                                  List<String> errorList)

    - #### scanPluginDir

          public static final void scanPluginDir​(File dir,
                                                 List<URL> jarList,
                                                 List<URL> pluginList,
                                                 List<String> errorList)