[RESOLVED] Issue Setting Application System Property using MMM

Hello,

I’m trying to set a System Property in my application from the MMM CLI.

The System Property I’m trying to set is logging.enable.

I tried the following command, without success:

mmm run -Dmicroej.java.property.logging.enable=true

When running my application, System.getProperty("logging.enable") returns null.

Is this the right way of setting a System Property?

Regards,

Fabrice

Hello f.webb,
To use the System Property in your application, you must pass it to the JVM as additional option by defining the launch.properties.jvm property in your command line:

mmm run -D"launch.properties.jvm"=“-Dmicroej.java.property.logging.enable=true”

Regards,
Denis

Hi Denis,

It worked, thanks!

Fabrice