How to run Mule on your Eclipse

I have the following setting on my machine:

  • Java 1.6.0_23
  • Eclipse Hellios
  • Mule 2.2.1

You can find almost a good Mule startup guide at here. However, this configuration guide is not really reliable. So follow the following instructions:
Configure your Eclipse with 1.5 version of Java. You need to download Java 1.5 and install it somewhere on your PC, doesn’t matter where.
You only need to configure Eclipse once. With subsequent projects, you can skip these steps.

  1. Start Eclipse.
  2. In the Workspace Launcher, specify the location of the examples directory under your
    Mule home directory (such as C:muleexamples), and click OK.
  3. Click the Workbench icon on the right to display the workbench.
  4. Choose Window > Preferences.
  5. Expand Java in the navigation tree, click Compiler, and then change the compiler
    compliance level to 1.5.
  6. Please note that you might get a warning message in your eclipse window saying that you need to create a JRE environment in your Eclipse.

Installing Mule IDE (Eclipse Galileo)

  1. Start Eclipse, and set up a workspace for your installation of Mule if you haven’t already.
    (Make sure your workspace does not have a space in the directory path)
  2. In the workbench view, choose Help > Install New Software.
  3. Click Add next to the Work with text box, enter, and click Enter.
  4. Click the Mule IDE check box and click Next, and after Eclipse processes for a moment,
    click Next again.
  5. Review the IDE license, select the option to accept the license, and then click Finish.
  6. Click Yes to restart Eclipse.

From this moment, it should be easy. Whatever project you need to create, just create as a Mule project. You need to have a Mule server installed for your Eclipse. Installing is as easy as downloading the mule from its website, unpacking it and then simply pointing to it via the Eclipse environment.
You also have the option to create a Mule configuration file. I suggest you to do that under a Mule project. Creating a project, you can simply be able to use the Mule examples as well. For example, you want to implement a simple web form, just click the Hello example and then you can change the code and have your own logic implemented.
When you use Eclipse, you are saving time. Whenever you change things in your source code and run it on the server, Eclipse will deploy all the jar files and you instantly see the results.
Just keep in mind that you need to run the configuration files and not java files using Eclipse Mule server configuration.

Leave a Reply

Your email address will not be published. Required fields are marked *