title: How to add a native library in Tomcat?
body: <p>I want to add gdal library in Tomcat. I read <a href="https://stackoverflow.com/questions/6150428/native-libraries-not-found-in-tomcat">Native libraries not found in Tomcat</a>  but don't understand where in <code>startup.bat</code> I should add <code>-Djava.library.path</code>.</p>
  
  <p>Errors:</p>
  
  <pre><code>exception
  
  javax.servlet.ServletException: Servlet execution threw an exception
  com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
  com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70)
  
  root cause
  
  java.lang.UnsatisfiedLinkError: org.gdal.ogr.ogrJNI.GetDriverCount()I
  org.gdal.ogr.ogrJNI.GetDriverCount(Native Method)
  org.gdal.ogr.ogr.GetDriverCount(ogr.java:98)
  org.geotools.data.ogr.OGRDataStore.&lt;clinit&gt;(OGRDataStore.java:169)
  test.Read.getKadnum(Read.java:56)
  test.Zipper.mifUnzip(Zipper.java:139)
  test.Zipper.Unzip(Zipper.java:60)
  test.uploadfile.doPost(uploadfile.java:105)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
  com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
  com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70)
  
  note The full stack trace of the root cause is available in the Apache Tomcat/7.0.23 logs.
  </code></pre>
  
  <p>I downloaded gdal 64bit from: <a href="http://vbkto.dyndns.org:1280/sdk/PackageList.aspx?file=release-1600-x64-gdal-1-9-mapserver-6-2.zip" rel="nofollow noreferrer">http://vbkto.dyndns.org:1280/sdk/PackageList.aspx?file=release-1600-x64-gdal-1-9-mapserver-6-2.zip</a></p>