Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Credit to @breakponchito
See payara/Payara#4551
The following block of code process the arguments to prepare the execution of the broker:
openmq/mq/main/mq-jmsra/jmsra-ra/src/main/java/com/sun/messaging/jms/blc/EmbeddedBrokerRunner.java at master · eclipse-ee4j/openmq
the following block:
process the brokerArgs and separates considering the delimiter as a white space, that is why when sending the following attribute:
brokerArgs= -jrehome "C:\Program Files\Java\jdk-11.0.12"
is processed as follows:
-jrehome
"C:\Program
Files\Java\jdk-11.0.12"
this is saved on a Vector that is processed after
then the following block of code validates the sequence of parameters. The expected case is waiting the path after the property -jrehome but after the previous separation we have two values after the property:
openmq/mq/main/mq-broker/broker-core/src/main/java/com/sun/messaging/jmq/jmsserver/Broker.java at master · eclipse-ee4j/openmq
that is why the following exception is thrown because the third position is not expected
openmq/mq/main/mq-broker/broker-core/src/main/java/com/sun/messaging/jmq/jmsserver/Broker.java at master · eclipse-ee4j/openmq
[2021-10-20T17:49:14.044-0500] [Payara 5.2021.9-SNAPSHOT] [SEVERE] [] [] [tid: _ThreadID=150 _ThreadName=JMS_PROXY_default_JMS_host-kernel(1) SelectorRunner] [timeMillis: 1634770154044] [levelValue: 1000] [[
java.lang.IllegalArgumentException: unknown option Files\Java\jdk-11.0.12"