title: ocijdbc11 Not found in java.library.path
body: <p>I inherited a small java utility from other developer -- just a couple of .java files and executable .jar.</p>
  
  <p>I run java program by passes a connection string. Now I need to change the connection string to Oracle from <code>jdbc:oracle:thin:&lt;user&gt;/&lt;password&gt;@host</code> to <code>jdbc:oracle:oci:&lt;user&gt;/&lt;password&gt;@host</code> to start using thick instead of thin driver.</p>
  
  <p>As a result I get the error: "ocijdbc11 (Not found in java.library.path)".</p>
  
  <p>Here my questions:</p>
  
  <ol>
  <li>Is ocijdbc11 a part of ojdbc7.jar? Or what file do java need?
  ANSW: ocijdbc11 is a library: <code>/oracle/client/o11r2/lib/libocijdbc11.so</code></li>
  <li>How can I see which paths java uses to find that <code>ocijdbc11</code>?</li>
  </ol>
  
  <p>Just in case:</p>
  
  <pre><code>$ ls /oracle/client/o12r1/
  
  assistants     diagnostics    jlib           oui            slax
  bin            dmu            ldap           owm            sqlplus
  cdata          has            lib            perl           srvm
  cfgtoollogs    hs             network        plsql          ucp
  clone          install        nls            precomp        usm
  crs            instantclient  odbc           QOpatch        utl
  css            inventory      OPatch         racg           wwg
  cv             javavm         opmn           rdbms          xdk
  dc_ocm         jdbc           oracore        relnotes
  deinstall      jdk            oraInst.loc    root.sh
  </code></pre>
  
  <p><strong>UPD</strong> I tried to use option <code>-Djava.library.path=/oracle/client/o11r2</code> and got other error. But I still don't know how to use Oracle 12.1 instead of 11.2.</p>
  
  <p><strong>UPD2</strong> I've changed environment paths to use Oracle 12 instead of 11. And now error looks like <code>ocijdbc12 (Not found in java.library.path)</code>. The file /oracle/client/o12r1/lib/libocijdbc12.so exists.</p>
  
  <p>I added <code>/oracle/client/o11r2/lib</code> to <code>LD_LIBRARY_PATH</code> -- the same error (<code>ocijdbc12 (Not found in java.library.path)</code>). I tried option <code>-Djava.library.path=/oracle/client/o12r2/lib</code> -- the same error. Could you please help me to fix it?</p>