title: How to use NDK-compiled JNI library in a normal non-Android Java application?
body: <p>I have a JNI library that was made to be used by Android app with NDK.
  I do not have sources, only compiled .so files for some archs.</p>
  
  <p>I want to call functions from this library in a simple console Java application on a 64-bit x86 linux PC.</p>
  
  <p>What I've done:</p>
  
  <ol>
  <li>I took the library from x86_64 folder and loaded it in my Java program using <code>System.loadLibrary</code></li>
  <li>Tried to launch the program and got UnsatisfiedLinkError with details <code>liblog.so: cannot open shared object file: No such file or directory</code>.</li>
  <li>So I took liblog.so for x86_64 arch from official NDK and loaded it too, then got a same error with <code>libstdc++.so: cannot open shared object file: No such file or directory</code></li>
  <li>Did the same thing for libstdc++.so library and got this <code>/usr/lib/x86_64-linux-gnu/libc.so: invalid ELF header</code>.</li>
  <li>Opened libc.so and it appeared to be just a text file... Replaced it with the proper libc.so file</li>
  <li>Finally got UnsatisfiedLinkError for my library with <code>undefined symbol: __stack_chk_guard</code> comment. Looks like my library is strongly tightened with Android things</li>
  </ol>
  
  <p>What should I do to use this library in my normal program without anything Android-specific?</p>