简体   繁体   English

读取.so文件时,System.loadLibrary卡住了

[英]System.loadLibrary stuck while reading .so file

I need to include native library into my applet. 我需要将本地库包含到我的applet中。 Everything works on Windows with .dll, but does not work on Linux with .so. 一切都可以在Windows中使用.dll,但不能在Linux中使用.so。 I signed the applet, all its resources and created appropriate jnlp file: 我签署了applet及其所有资源,并创建了相应的jnlp文件:

<resources os="Windows" arch="x86_64">
    <nativelib href="dll/com/Windows_x64/test.jar"/>
</resources>
<resources os="Linux" arch="amd64">
    <nativelib href="dll/com/Linux_x64/test.jar"/>
</resources>
<resources os="Linux" arch="x86_64">
    <nativelib href="dll/com/Linux_x64/test.jar"/>
</resources>
<resources os="Linux" arch="x86">
    <nativelib href="dll/com/Linux_x32/test.jar"/>
</resources>
<resources os="Linux" arch="i386">
    <nativelib href="dll/com/Linux_x32/test.jar"/>
</resources>

test.jar for linux contains only test.so file and META-INF sign data. 用于Linux的test.jar仅包含test.so文件和META-INF标志数据。

And applet stuck on the following row without any exception: System.loadLibrary("test"); 并且applet毫无例外地粘在下面的行上:System.loadLibrary(“ test”);

Could somebody please help with/give me a prompt to solve this issue? 有人可以帮忙给我一个提示来解决这个问题吗? Please let me know if I need to provide more helpful info? 请让我知道是否需要提供更多有用的信息?

I already checked the following topic: Java System.loadLibrary call on Linux freezes And did the following test: Created a separate main class and try to load my .so there and it works ok. 我已经检查了以下主题: Linux上的Java System.loadLibrary调用冻结并进行了以下测试:创建了一个单独的主类,并尝试在其中加载我的.so并正常工作。

test.jar for linux contains only test.so file and META-INF sign data. 用于Linux的test.jar仅包含test.so文件和META-INF标志数据。

The name of the lib should be libtest.so. 库的名称应为libtest.so。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM