Trying to make simple document converter with Java by executing a soffice process.
But suddenly simple code like this hangs and does not prints anything.
ProcessBuilder pb = new ProcessBuilder(List.of("/opt/homebrew/bin/soffice", "--help"));
Process p = pb.directory(new File(sdir)).inheritIO().start();
System.out.println("errcode : " + p.waitFor()); //The process never ends!
Executing other commands(like “echo hello”) works, running “/opt/homebrew/bin/soffice --help” directly in shell works, running this code in Windows also works.
Also, since this code worked a few months ago, so I suspect it might be a problem of newer version.
My environment is openjdk 17.0.13 and LibreOffice 24.8.2.1 (0f794b6e29741098670a3b95d60478a65d05ef13) in MacOS Sonoma 14.6.1.
Is there anyone having same issue?