Loading

How to Set Mule and Java System Properties at Mule Runtime Startup in Various Environments

게시 일자: Apr 28, 2026
과업

GOAL

Set Java system properties or Mule environment variables for a Mule Runtime instance

단계

Mule is normally started from a batch or shell script (e.g. mule.bat). In order to pass JVM arguments and properties to Mule, you can use either of the following approaches:

  • Add new wrapper.java.additional.N entry into the wrapper.conf file (where N=the associated property number)

  • Use the -M command line argument

Note: this will set the system property for all Mule applications deployed in that Mule runtime. As an alternative, you could simply want to set properties for your particular application if you don't need to change the behavior of the JVM or an external library.

Modifying Wrapper Configuration

Mule is actually started by the Java Service Wrapper, which uses a wrapper.conf configuration file within the <MULE_HOME>/conf directory. A JVM argument can be added using this format:
wrapper.java.additional.6=-Dorg.mule.xml.validate=false

Setting properties on the command line when starting Mule

The startup script for Mule allows you to enter ad-hoc JVM arguments via the -M flag (see MULE-2601). The format is:

mule -config <config.file> -M<argument.1> -M<argument.2>

For instance:

$ mule -config foo.xml -M-Dorg.mule.xml.validate=false -M-Djava.mail.debug=true

Anypoint Studio

  • When running an application inside Studio you can set JVM parameters in the Run Configuration: Menu Run / Run Configurations... / Arguments tab / VM Arguments. Use the standard Java format for parameters.
Example:
-Dorg.mule.xml.validate=false -Djava.mail.debug=true
  • Another option is to add the arguments in the wrapper.conf file from the Mule Runtime bundled in Studio. 

    Please note with this option you will add the arguments in all your mule applications used by the runtime. The instructions can be found here


CloudHub 1.0, CloudHub 2.0 & Runtime Fabric applications

If you are deploying your application to CloudHub/RTF just add the property as you would with any other application property, don't include any hyphens or command line parameter.

  • In CloudHub 1.0 and CloudHub 2.0, both Mule and Java system properties need to be set in the Properties tab.
  • In Runtime Fabric, Mule properties should be configured in the Properties tab, while Java system properties must be set in the JVM tab.

Example:

org.mule.xml.validate=false
java.mail.debug=true

MUnit - VM arguments for recorder
The instructions to enforce UTF-8 encoding for Transform Message output can be found here.

See Setting CloudHub Application Properties

Knowledge 기사 번호

001115098

 
로드 중
Salesforce Help | Article