使用Runtime.getRuntime().exec( cmdAry );
和一个字符串作为数组。
Exeption Cannot run program "libreoffice": error=2, No such file or directory
如果我在终端中输入确切的命令字符串,它将起作用。
这里是命令字符串:
libreoffice --impress --show /home/xxx/ImpressTests/ShowTestOne.odp
Linux Mint 19.3相同的Java程序在Windows 10上可以正常运行。
在Linux终端上,程序成功运行后显示此信息。重新保存文件不能解决此问题。
xxx@LM19RyzenVM:~/CodeJava$ libreoffice --impress --show /home/xxx/ImpressTests/ShowTestOne.odp
func=xmlSecCheckVersionExt:file=xmlsec.c:line=188:obj=unknown:subj=unknown:error=19:invalid version:mode=abi compatible;expected minor version=2;real minor version=2;expected subminor version=25;real subminor version=26
xxx@LM19RyzenVM:~/CodeJava$
此libreoffice错误是否导致失败?这以前工作。如何查找有关错误的更多信息?它在VirtualBox VM中运行。可能会有所不同吗?我现在将在真实计算机上进行测试。
谢谢。