title: JNI error when directory with .so my .so depends on did not exist
body: <p>Don't ask why I need that, trust me I do Setup is very simple. I have native method which is in libjnitester.so. libjnitester.so depends on libcall.so (libs just simulate real ones). I need to dynamically install the libs to the directory prior to calling native method. I do that by creating the directory with File.mkdris, and then by calling tar to extract tar.gz into that directory (I wait for completion of tar process so files are definitely there by the time I call JNI method). When calling the method, I'm getting:</p>
  
  <blockquote>
    <p>java.lang.UnsatisfiedLinkError: /.../libjnitester.so: libcall.so:
    cannot open shared object file: No such file or directory</p>
  </blockquote>
  
  <p>I specify <code>-Djava.library.path</code> and have <code>LD_LIBRARY_PATH</code> defined. I assume problem is in <code>LD_LIBRARY_PATH -</code> as directory did not exist when I started JVM, and has been created only during the execution, it is ignored. If I pre-create the directory (without .so files) then start JVM everything works fine.</p>
  
  <p>Question - how can I dynamically install .so with my JNI method and .so files it depends on, into a new directory?</p>