malliaridis commented on PR #2712:
URL: https://github.com/apache/solr/pull/2712#issuecomment-2407109386

   If this is the only use-case I would avoid adding an entire library and 
prefer the workaround. I had to make three changes though to make it work:
   
   - Define `isWindows` in `getCommandLine(ProcessHandle)`, for example as:
     ```java
     boolean isWindows = System.getProperty("os.name").startsWith("Windows");
     ```
   - Replace any call to `ProcessHandle.Info#commandLine()` with 
`commandLine(ProcessHandle)` 
   - Replace any call to `ProcessHandle.Info#arguments()` with 
`getCommandLine(ProcessHandle).orElse("").split(" ")`
   
   Additional comments documenting the reason for the workaround should be 
added as well of course.
   
   However, I am not sure if the process is the right place to lookup 
information like the port number. We may have changes in the future that 
eventually do not require / provide the port as an argument. At least that's 
what I think if we further simplify the CLI scripts.


-- 
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: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to