This page last changed on May 31, 2006 by tcarlson.

To start a mule server from a script or from your IDE, you can use the org.mule.MuleServer class. Tis accepts a couple of parameters.

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

org.mule.MuleServer -builder <fully qualified classname> -config appContext.xml
  • -config param specifies one or more config files to use. If this argument is ommitted the default 'mule-config.xml' will be used.
  • -builder param is a fully qualified classname of the config builder to use. If this is not set the default org.mule.config.builders.MuleXmlConfigurationBuilder is used.

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

You can also start a mule server from your code by using one of -

//create a new server and configure it with two config files
MuleServer server = new MuleServer("mule-config1.xml,mule-config2.xml");

//Start the server. The boolean argument determines if the server should start 
//in a new thread or use the current thread
server.start(true);


Often it will not be necessary to start the server like this. If you want to embed Mule in an application or a webapp see -

Document generated by Confluence on Oct 03, 2006 09:23