there is a class:
DesktopApi.java With Method: public static boolean runCommand (String command, String args, String file) {
String cmd = "soffice --invisible -p '/media/user/UBUNTU18_0/welcome.doc'"; try { Process p = Runtime.getRuntime().exec(cmd); System.out.println(cmd); try { p.waitFor(); } catch (InterruptedException e) { e.printStackTrace(); } try { int retval = p.exitValue(); System.out.println("Process exitValue: " + retval); if (retval == 0) { logErr("Process ended immediately."); return false; } else { logErr("Process crashed."); return false; } } catch (IllegalThreadStateException itse) { itse.printStackTrace(); logErr("Process is rnnuing."); return true; } }catch (IOException e) { logErr("Error running command.", e); return false; } } The method attempts to print a .doc file via bash using libre. But he is unable to execute the command.
No errors. But the result too.
When you launch Libre without arguments, the software opens without problems, but after adding to print ... It does not respond at all.
System UBUNTU 18_0.