title: Sqlite4java on Raspberry Pi
body: <p>I want to use my java project on Raspberry Pi. This code depends on sqlite4java which uses native implementations for many platforms including arm processors <a href="http://code.google.com/p/sqlite4java/downloads/list" rel="nofollow">link</a>.</p>
  
  <p>The problem is that java can't load required sqlite wrapper for arm processor. I was doing the follows:</p>
  
  <ol>
  <li><p>Copied all version (tried one by one) of precompiled libraries (<code>libsqlite4java-linux-armv5te.so</code>, <code>libsqlite4java-linux-armv7a.so</code>, <code>libsqlite4java-linux-arm.so</code>) which I renamed to <code>libsqlite4java-linux-arm.so</code>.</p></li>
  <li><p>Command <code>java -Djava.library.path=. -jar sqlite4java.jar -d</code> gives output:</p>
  
  <pre><code>140213:092447.509 FINE [sqlite] Internal: loading library
  140213:092447.536 FINE [sqlite] Internal: java.library.path=.
  140213:092447.538 FINE [sqlite] Internal: sqlite4java.library.path=null
  140213:092447.541 FINE [sqlite] Internal: cwd=/home/pi/sqlite4java-282/.
  140213:092447.544 FINE [sqlite] Internal: default path=/home/pi/sqlite4java-282
  140213:092447.554 FINE [sqlite] Internal: forced path=null 
  140213:092447.558 FINE [sqlite] Internal: os.name=linux; os=linux
  140213:092447.562 FINE [sqlite] Internal: os.arch=arm
  140213:092447.575 FINE [sqlite] Internal: trying to load sqlite4java-linux-arm from /home/pi/sqlite4java-282/libsqlite4java-linux-arm.so
  140213:092447.596 FINE [sqlite] Internal: cannot load sqlite4java-linux-arm from /home/pi/sqlite4java-282/libsqlite4java-linux-arm.so: java.lang.UnsatisfiedLinkError: /home/pi/sqlite4java-282/libsqlite4java-linux-arm.so: /home/pi/sqlite4java-282/libsqlite4java-linux-arm.so: cannot open shared object file: No such file or directory
  140213:092447.605 FINE [sqlite] Internal: trying to load sqlite4java-linux-arm
  140213:092447.617 FINE [sqlite] Internal: cannot load sqlite4java-linux-arm: java.lang.UnsatisfiedLinkError: /home/pi/sqlite4java-282/libsqlite4java-linux-arm.so: /home/pi/sqlite4java-282/libsqlite4java-linux-arm.so: cannot open shared object file: No such file or directory
  140213:092447.622 FINE [sqlite] Internal: trying to load sqlite4java-linux
  140213:092447.627 FINE [sqlite] Internal: cannot load sqlite4java-linux: java.lang.UnsatisfiedLinkError: no sqlite4java-linux in java.library.path
  140213:092447.638 FINE [sqlite] Internal: trying to load sqlite4java
  140213:092447.642 FINE [sqlite] Internal: cannot load sqlite4java: java.lang.UnsatisfiedLinkError: no sqlite4java in java.library.path
  140213:092447.645 FINE [sqlite] Internal: trying to load sqlite4java-linux-arm-d
  140213:092447.660 FINE [sqlite] Internal: cannot load sqlite4java-linux-arm-d: java.lang.UnsatisfiedLinkError: no sqlite4java-linux-arm-d in java.library.path
  140213:092447.676 FINE [sqlite] Internal: trying to load sqlite4java-linux-d
  140213:092447.680 FINE [sqlite] Internal: cannot load sqlite4java-linux-d: java.lang.UnsatisfiedLinkError: no sqlite4java-linux-d in java.library.path
  140213:092447.683 FINE [sqlite] Internal: trying to load sqlite4java-d
  140213:092447.699 FINE [sqlite] Internal: cannot load sqlite4java-d: java.lang.UnsatisfiedLinkError: no sqlite4java-d in java.library.path
  Error: cannot load SQLite
  java.lang.UnsatisfiedLinkError: /home/pi/sqlite4java-282/libsqlite4java-linux-arm.so: /home/pi/sqlite4java-282/libsqlite4java-linux-arm.so: cannot open shared object file: No such file or directory
  at java.lang.ClassLoader$NativeLibrary.load(Native Method)
  at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1957)
  at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1882)
  at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1843)
  at java.lang.Runtime.load0(Runtime.java:795)
  at java.lang.System.load(System.java:1061)
  at com.almworks.sqlite4java.Internal.tryLoadFromPath(Internal.java:337)
  at com.almworks.sqlite4java.Internal.loadLibraryX(Internal.java:117)
  at com.almworks.sqlite4java.SQLite.main(SQLite.java:368)
  </code></pre></li>
  <li><p>Tried to set up <code>LD_LIBRARY_PATH</code> to <code>/usr/lib/arm-linux-gnueabihf</code> and <code>/usr/lib</code> </p></li>
  </ol>
  
  <p>On given path file exists. I had installed <code>sqlite3</code> and <code>libsqlite3-dev</code>. I'm using the latest raspbian distro on QEMU emulator:</p>
  
  <pre><code>$ uname -a
  $ Linux raspberrypi 3.10.26+ #2 Fri Jan 17 22:13:59 EST 2014 armv6l GNU/Linux
  </code></pre>
  
  <p>Any help will be useful.</p>
  
  <p>Thanks!</p>