使用Libre Office API并在java.lang.UnsatisfiedLinkError上弹跳:

Exception in thread "main" java.lang.UnsatisfiedLinkError: com.sun.star.lib.connections.pipe.PipeConnection.createJNI(Ljava/lang/String;)I
    at com.sun.star.lib.connections.pipe.PipeConnection.createJNI(Native Method)
    at com.sun.star.lib.connections.pipe.PipeConnection.<init>(PipeConnection.java:125)
    at com.sun.star.lib.connections.pipe.pipeConnector.connect(pipeConnector.java:134)
    at com.sun.star.comp.connections.Connector.connect(Connector.java:138)
    at com.sun.star.comp.urlresolver.UrlResolver$_UrlResolver.resolve(UrlResolver.java:120)
    at com.sun.star.comp.helper.Bootstrap.bootstrap(Bootstrap.java:292)
    at HelloTextTableShape.getRemoteServiceManager(HelloTextTableShape.java:446)
    at HelloTextTableShape.newDocComponent(HelloTextTableShape.java:433)
    at HelloTextTableShape.useWriter(HelloTextTableShape.java:115)
    at HelloTextTableShape.useDocuments(HelloTextTableShape.java:107)
    at HelloTextTableShape.main(HelloTextTableShape.java:98)
CE> Warning: -nologo is deprecated.  Use --nologo instead.
CE> Warning: -nodefault is deprecated.  Use --nodefault instead.
CE> Warning: -norestore is deprecated.  Use --norestore instead.
CE> Warning: -nolockcheck is deprecated.  Use --nolockcheck instead.
CE> Warning: -accept=pipe,name=uno7528184211562854035;urp; is deprecated.  Use --accept=pipe,name=uno7528184211562854035;urp; instead.


有人知道如何处理吗?似乎在互联网上找不到好的解决方案/

最佳答案

您缺少-Djava.library.path或(如果不在Windows上)LD_LIBRARY_PATH的设置,该设置指向com.sun.star.lib.connections.pipe.PipeConnection.createJNI(Ljava / lang / String;)I的JNI库。

10-07 19:08
查看更多