<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: UnsatisfiedLinkError when trying to load shared library containing native method in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/unsatisfiedlinkerror-when-trying-to-load-shared-library/m-p/2698658#M715591</link>
    <description>Well, thanks to HP-UX tech support, I was able to figure out the problem.  They pointed me to the following document:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.hp.com/products1/unix/java/infolibrary/prog_guide/java1/JNI_java1.html" target="_blank"&gt;http://www.hp.com/products1/unix/java/infolibrary/prog_guide/java1/JNI_java1.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;By using this document I was able to figure out that the problem was caused, not because my library couldn't be found, but rather, because my library wasn't linked with some other necessary libraries.&lt;BR /&gt;&lt;BR /&gt;Once I recompiled my shared library and added the following libraries to my link command, everything worked.&lt;BR /&gt;&lt;BR /&gt;  -lCsup -lstream -lstd&lt;BR /&gt;&lt;BR /&gt;Hopefully this will help anyone else stuck in this situation.&lt;BR /&gt;</description>
    <pubDate>Sun, 07 Apr 2002 17:52:42 GMT</pubDate>
    <dc:creator>David Calkins_2</dc:creator>
    <dc:date>2002-04-07T17:52:42Z</dc:date>
    <item>
      <title>UnsatisfiedLinkError when trying to load shared library containing native method</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unsatisfiedlinkerror-when-trying-to-load-shared-library/m-p/2698657#M715590</link>
      <description>I'm using Java 1.1.8.04 on HP-UX 10.20.&lt;BR /&gt;&lt;BR /&gt;I've created a Java class with a native method.  I then used javah -jni MyClass to generate the native header file.  I then implemented the method in C and compiled it into a shared library (.sl).&lt;BR /&gt;&lt;BR /&gt;When I try and run the Java class, I get the following error:&lt;BR /&gt;&lt;BR /&gt;java.lang.UnsatisfiedLinkError: no MyLib in shared library path&lt;BR /&gt;        at java.lang.Runtime.loadLibrary(Runtime.java)&lt;BR /&gt;        at java.lang.System.loadLibrary(System.java)&lt;BR /&gt;        at &lt;BR /&gt;        at java.lang.Thread.init(Thread.java)&lt;BR /&gt;&lt;BR /&gt;The library is actually libMyLib.sl.  In the Java class, I have&lt;BR /&gt;&lt;BR /&gt;static {&lt;BR /&gt;  System.loadLibrary("MyLib");&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;And, I've verified that the directory containing the shared library is in the SHLIB_PATH and LD_LIBRARY_PATH variables.&lt;BR /&gt;&lt;BR /&gt;Any idea why its not able to find the library?</description>
      <pubDate>Sun, 07 Apr 2002 15:47:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unsatisfiedlinkerror-when-trying-to-load-shared-library/m-p/2698657#M715590</guid>
      <dc:creator>David Calkins_2</dc:creator>
      <dc:date>2002-04-07T15:47:37Z</dc:date>
    </item>
    <item>
      <title>Re: UnsatisfiedLinkError when trying to load shared library containing native method</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unsatisfiedlinkerror-when-trying-to-load-shared-library/m-p/2698658#M715591</link>
      <description>Well, thanks to HP-UX tech support, I was able to figure out the problem.  They pointed me to the following document:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.hp.com/products1/unix/java/infolibrary/prog_guide/java1/JNI_java1.html" target="_blank"&gt;http://www.hp.com/products1/unix/java/infolibrary/prog_guide/java1/JNI_java1.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;By using this document I was able to figure out that the problem was caused, not because my library couldn't be found, but rather, because my library wasn't linked with some other necessary libraries.&lt;BR /&gt;&lt;BR /&gt;Once I recompiled my shared library and added the following libraries to my link command, everything worked.&lt;BR /&gt;&lt;BR /&gt;  -lCsup -lstream -lstd&lt;BR /&gt;&lt;BR /&gt;Hopefully this will help anyone else stuck in this situation.&lt;BR /&gt;</description>
      <pubDate>Sun, 07 Apr 2002 17:52:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unsatisfiedlinkerror-when-trying-to-load-shared-library/m-p/2698658#M715591</guid>
      <dc:creator>David Calkins_2</dc:creator>
      <dc:date>2002-04-07T17:52:42Z</dc:date>
    </item>
    <item>
      <title>Re: UnsatisfiedLinkError when trying to load shared library containing native method</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unsatisfiedlinkerror-when-trying-to-load-shared-library/m-p/2698659#M715592</link>
      <description>I had a some close problem this my library libLibrairie.sl (SHLIB_PATH=/patch/myenv).&lt;BR /&gt;I called the methode like this&lt;BR /&gt;&lt;BR /&gt;System.loadLibrary ("libLibrairie");&lt;BR /&gt;&lt;BR /&gt;It did not work.&lt;BR /&gt;&lt;BR /&gt;System.loadLibrary ("Librairie");&lt;BR /&gt;&lt;BR /&gt;Works better because unix adds the prefix "lib" by its owns.&lt;BR /&gt;I hope it will help you&lt;BR /&gt;By.&lt;BR /&gt;Emmanuel</description>
      <pubDate>Wed, 26 May 2004 09:27:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unsatisfiedlinkerror-when-trying-to-load-shared-library/m-p/2698659#M715592</guid>
      <dc:creator>GRANDIERE</dc:creator>
      <dc:date>2004-05-26T09:27:31Z</dc:date>
    </item>
  </channel>
</rss>

