0

I need to include native library into my applet. Everything works on Windows with .dll, but does not work on Linux with .so. I signed the applet, all its resources and created appropriate jnlp file:

<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.

And applet stuck on the following row without any exception: 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.

Community
  • 1
  • 1
rgolovakha
  • 518
  • 2
  • 5
  • 17
  • *"..and created appropriate jnlp file: "* First check the JNLP using JaNeLA, available [here](https://drive.google.com/folderview?id=0B5B9wDXIGw9lUnJaUjA2cmlVRE0). Then (after checking is has no red/pink error lines in the output) post it here as an [edit to the question](http://stackoverflow.com/posts/24381475/edit). – Andrew Thompson Jun 24 '14 at 09:29
  • thank you for your response. I am checking full jnlp using your tool. I edited the post to show the part of my jnlp file I was going to show (which should download my native libs). – rgolovakha Jun 24 '14 at 10:10
  • *"show the part of my jnlp file.."* Show the entire file. Are any errors reported by the JaNeLA tool? – Andrew Thompson Jun 24 '14 at 10:33
  • Thanks for your tool. It shows me an error related to linux X86 system. This case is not related to current issue (as I have x64 system) but helped me to avoid it in the future. – rgolovakha Jun 24 '14 at 11:00

1 Answers1

0

test.jar for linux contains only test.so file and META-INF sign data.

The name of the lib should be libtest.so.

ankon
  • 4,128
  • 2
  • 26
  • 26
  • Thank you a lot. This was an issue. I had the reverse case. My .so have libtest.so name, in this case I need to use System.loadLibrary("test"). – rgolovakha Jun 24 '14 at 10:58