When I try to print from a java application I get this error message:
Caused by: java.io.IOException: Cannot run program "/usr/bin/lpr": error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
I added cups-bsd to the snap and lpr is availalble in $SNAP/usr/bin/lpr.
But in the JDK in PSPrinterJob.java the path of lpr is hardcoded and expected to be /usr/bin/lpr
(from PSPrinterJob.java in openjdk 11)
1621 String osname = System.getProperty("os.name"); 1622 if (osname.equals("Linux") || osname.contains("OS X")) { 1623 execCmd = new String[ncomps]; 1624 execCmd[n++] = "/usr/bin/lpr";
Is there a way to make lpr available as /usr/bin/lpr inside the snap?