Launching MockMotor

The script starts MockMotor with the config file in the current directory.

You can just run it as-is right after the download. It starts MockMotor with the maximum available memory on all interfaces and ports 7080/7081.

Note that the is not stopping the currently running MockMotor process if there is one. To restart a MockMotor process, run the script first.

See available parameters below.

Startup Parameters

To start MockMotor with the default configuration, execute the start script:

# ./

After necessary checks and setup, the script simply calls Java with mockmotor.jar and mockmotor.config.xml configuration file:

java -cp mockmotor.jar -c mockmotor.config.xml

You can change some parameters of this execution.

Change Used Config File

By default, the start script uses mockmotor.config.xml from the current working directory.

If the file doesn’t exist, the script creates it by copying mockmotor.config.xml.template file.

You can specify the configuration file location as a parameter to the script:

# ./ /etc/mockmotor/mockmotor.config.xml

Change Used Java Executable

The script looks for java in two places:

The $JAVA_HOME/bin/java, if found
The java executable on the $PATH, if found

To make MockMotor use your preferred version of Java, either set the JAVA_HOME environment variable, or add that version to PATH.

Change Java Options

To fine-tune the Java execution, set the desired options in MM_JAVA_OPTIONS environment variable.

For example, to limit the memory to 32G, do:

# export MM_JAVA_OPTIONS=-Xmx32g
# ./