philci52 commented on PR #9869:
URL: https://github.com/apache/nifi/pull/9869#issuecomment-2797958617
Here is a comment from some of our internal code regarding the use of
process builder and windows/linux differences. This application uses an XML
file for configuration, but I figured it would be relevant to this conversation
```
Java Application Operating system Differences:
MS Windows:
When calling a java process on MS Windows from OURAPP, java will
automatically
expand glob characters and Java uses double quotes to suppress glob
expansion. Glob characters
are []{}*?. This can lead to some unexpected behavior when calling java
processes from OURAPP.
To suppress this expansion when calling a java application from within
OURAPP, you must surround the
argument with double quotes. For example <arg>"test_*"</arg> or
<arg><![CDATA["test_*"]]></arg>. The application will then get test_* as
the parameter.
If you need to place quotes in argument itself, you must surround the
argument with double quotes
and the use two double quotes to represent one double quote. For example,
if you want the string
P"J"D, then you would use <arg><![CDATA["P""J""D"]]></arg>
Linux/Unix:
When calling a java process from within from OURAPP on Linux, the java
application will get
the exact value that you pass it, except for -cp argument, which java will
expand.
If you want glob expansion, you must wrap the java application with a call
to the shell.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]