title: Configuring libmediainfo to work with Java project without installation across all platforms (OSes)
body: <p>I am using mediainfo (<a href="http://mediainfo.sourceforge.net/en" rel="nofollow">http://mediainfo.sourceforge.net/en</a>) to extract information from audio and video files using Java code. </p>
  
  <p>My java project runs over all platforms (osx, win &amp; linux). So far I have only tested mediainfo over osx where the procedure is simple: just put libmediainfo.dylib in the target folder and access it using a native library and you're good to go. And the solution works flawlessly...</p>
  
  <p>I am now looking to expand this functionality to the other OSs, starting with Linux. However, it is proving to be more of a challenge than I thought.
  At first I kept getting this:</p>
  
  <pre><code>"java.lang.UnsatisfiedLinkError: Unable to load library 'mediainfo': libmediainfo.so: cannot open shared object file: No such file or directory"
  </code></pre>
  
  <p>and this was expected as it was looking in /usr/lib </p>
  
  <p>but this was solved by installing the suitable libmediainfo0 &amp; libzen0 ".deb from <a href="http://mediainfo.sourceforge.net/en/Download/Ubuntu" rel="nofollow">http://mediainfo.sourceforge.net/en/Download/Ubuntu</a></p>
  
  <p>Still, my solution needs to be portable, meaning, I want all necessary resources to be included with the java project package without requiring any further installations.
  I also need to know if it's possible to change mediainfo to look for the resources in my java package instead of a system location.</p>
  
  <p>For your reference, I am using Java Native Access (jna) to interact with the library. Also using the MediaInfo.java &amp; MediaInfoLibrary.java classes that the website suggests.
  Let me know if you need other details.</p>
  
  <p>any wisdom is highly appreciated
  thanks!!</p>