0

When running Payara Micro, you can use the --systemProperties command line argument to specify a file containing system properties to set. What is the format of this file?

As an example (using Payara Micro 172), if I create a file called system.properties and use it via:

java -jar myPayaraJar.jar ... --systemProperties system.properties

...and it looks like this:

payaramicro.disablePhoneHome=true

...then I do not see that phoning home has been disabled. By contrast, if I specify --disablephonehome as the command line option, I do see that Payara has disabled this feature.

Is there a different format for this properties file that I should be using instead?

Laird Nelson
  • 15,321
  • 19
  • 73
  • 127
  • Have you tried setting the system properties in all lower case? A while back the command line options were case sensitive and they were changed so case doesn't matter. It could be that this bit of code doesn't scrub out cases since I think it's older than the change to ignore case in the command line options. Just a thought. – Mike Sep 10 '17 at 08:37

2 Answers2

0

I see from the source code that the format of this file is a regular java.util.Properties file. There must be some other bug going on.

Laird Nelson
  • 15,321
  • 19
  • 73
  • 127
0

The format of the file is usual Java properties file.

However, there seems to be a bug in Payara Micro. I see you've already raised a bug in github which is the best you could do: https://github.com/payara/Payara/issues/1953

OndroMih
  • 7,280
  • 1
  • 26
  • 44
  • Thanks for your prompt answer! Yes, that's correct: while it seems possible to directly pass system properties that will override certain command line options, it does not seem to be possible to do so by way of the `--systemPropertiesFile` argument at the moment. That's fine; at least I understand how it's _supposed_ to work! – Laird Nelson Sep 13 '17 at 15:37