Exec persistence issues - piping to netcat

I confused thing by using pwd, but I’m just trying to sent a random string and not the output of the pwd command.

Doing research on executeCommandLine(), I think the problem could be similar that discussed here:

And here is a possibly relevant note from the source code on the use of the @@ delimeter:
*


* Executes commandLine. Sometimes (especially observed on
* MacOS) the commandLine isn’t executed properly. In that cases another
* exec-method is to be used. To accomplish this please use the special
* delimiter ‘@@’. If commandLine contains this
* delimiter it is split into a String array and the special exec-method
* is used.
*


*


* A possible {@link IOException} gets logged but no further processing is
* done.
*

Not sure how to implement this though…