You are viewing an older version of this section. Click here to navigate to the latest version.

Running the Examples With the Example Launcher

The easiest way to start using Mule ESB is to walk through the prepackaged examples. The example launcher, which runs in a browser and is also prepackaged along with the Mule distribution, provides a one-stop place to browse and run these examples.

Running the Example Launcher Application

To start Mule ESB and see all the prepackaged examples, perform the following steps:

  1. From the bin directory where Mule ESB was uncompressed, execute mule_examples

    code,code-none---- code,code-none # Unix$ <Mule Installation Directory>/bin/mule_examplesrem WindowsC:\> <Mule Installation Directory>\bin\mule_examples

. Wait until Mule starts and all the examples are deployed. A browser window will open with the home page of the Mule ESB Example Launcher application (http://localhost:18082/examples/).

Now you can click through the Mule Examples Catalog on the left, read the overview, review the source code, and run the example itself.

Examples that are bundled with Mule ESB display:

* an overview of what the example is, what technologies are involved and how the solution is addressed
* the Mule configuration file showing the configuration of the example
* a client interface that indicates how to try out the example and, when possible, allow you to test it online

Once you are finished, you can stop Mule by executing in `bin` directory the command: `mule stop`

# Unix$ <Mule Home Directory>/bin/mule stoprem WindowsC:\> <Mule Home directory>\bin\mule stop

Deploying Examples Individually

Many of the examples are distributed with Mule as pre-packaged application archives. To run them just copy the example zip archive from the example directory into the <Mule Home Directory>/apps directory and Mule will automatically deploy the example. Batch scripts are no longer provided to run the examples. Be sure you have completed all the instructions in Hello, Mule! before you attempt to run the example.


  • Mule Example Launcher

    • If the browser window didn’t open, then you might have an unsupported browser. Don’t worry, just open your browser and go to: http://localhost:18082/examples

    • In some cases Mule ESB may take a long time to start and the mule_examples script may timeout. If this is the case, just wait until Mule ESB finishes starting (check the log files in <Mule Home Directory>/logs) and in your browser, open the URL http://localhost:18082/examples

  • General for all examples

    • Check if Mule ESB started correctly. Take into account that the Mule examples will listen on specific TCP/IP ports. Check there is no other application or Mule ESB instance using these ports.

    • Currently, Mule ESB doesn’t require the environment variable MULE_HOME set, but if the variable is set and pointing to a different directory of where the new Mule ESB instance was uncompressed, then Mule ESB won’t start correctly. Just remove the environment variable.

  • The Stock Quote example requests data an external site, so besides requiring Internet access, the service may be also unavailable.

    • MULE_BASE environment variable is no longer required. If you experience any file not found problem, please unset this environment variable.

Note that the application archive that is assembled when building the example has a different name than the pre-packaged application. This allows you to make modifications to the example and have both versions, the original and your modified one, running at the same time.

image Mule Example Launcher (mule-example-launcher) is an example on its own, but in order to be completely functional it requires other examples to be deployed first. If you build and deploy this example with Maven, take into account that you should start Mule ESB with the command MULE_HOME/bin/mule_examples

Additional Mule Enterprise Examples

For additional Mule Enterprise examples, go to the Knowledge Base on the Customer Portal.