title: Including native c++ .so library in IntelliJ using JNI under Ubuntu
body: <p>I'm building a shared library which will be called from Java IntelliJ using JNI under Ubuntu 14.04 x64.
  When calling my .so file using <code>System.loadLibrary("libtestJniLib")</code> in Intellij I got the following error:</p>
  
  <pre><code>Exception in thread "main" java.lang.UnsatisfiedLinkError: no
  libtestJniLib in java.library.path
  </code></pre>
  
  <p>The Intellij configurations determine the path to library:</p>
  
  <pre><code>1) Run-&gt;Edit Configurations-&gt;VM options: -Djava.library.path=/home/username/Libs
  2) In "Project structure -&gt; Libraries -&gt;Native library locations"
  </code></pre>
  
  <p>I added the same path: <code>/home/username/Libs</code></p>
  
  <p>When testing it using method mentioned below I have a correct path.</p>
  
  <pre><code>String javaLibPath = System.getProperty("java.library.path");
  </code></pre>
  
  <p>IntelliJ's started under root.</p>