Contact Us 1-800-596-4880

Configuring Mule to Run From a Script

To start Mule from a script or from your IDE without using the Java Service Wrapper, you can use the org.mule.MuleServer class. This class accepts a couple of parameters.

org.mule.MuleServer -config mule-config.xml

or

org.mule.MuleServer -builder <fully qualified classname> -config appContext.xml
  • -config specifies one or more configuration files to use. If this argument is omitted, it will look for and use mule-config.xml if it exists.

  • -builder is a fully qualified classname of the configuration builder to use. If this is not set, the default org.mule.config.builders.AutoConfigurationBuilder is used, which will try to auto-detect configuration files based on available builders. In the most common scenario, this will resolve to org.mule.config.spring.SpringXmlConfigurationBuilder.

The easiest way to set the classpath is to include all JARs in the ./lib/mule and ./lib/opt directories of the distribution. You can look at the dependency report for the server and each of the modules to see exactly which JARs are required for a particular module.