<?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: Java, JNI, aCC in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/java-jni-acc/m-p/2416710#M765216</link>
    <description>Thanks.  I didn't know the sample program was there.  :)&lt;BR /&gt;&lt;BR /&gt;  I able to run it and have found the problem with my code.  I have &lt;BR /&gt;misunderstood that the shared library should be prefixed with libc instead of &lt;BR /&gt;c.&lt;BR /&gt;&lt;BR /&gt;  Thank you!  Merry Christmas!</description>
    <pubDate>Sun, 19 Dec 1999 01:18:50 GMT</pubDate>
    <dc:creator>Lee Yeow leong</dc:creator>
    <dc:date>1999-12-19T01:18:50Z</dc:date>
    <item>
      <title>Java, JNI, aCC</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/java-jni-acc/m-p/2416706#M765212</link>
      <description>I'm trying to use JNI on a HP-UX 10.2 without success.  Below is the steps &lt;BR /&gt;that I took.&lt;BR /&gt;&lt;BR /&gt;1. Wrote the Java class.&lt;BR /&gt;&lt;BR /&gt;public class HelloWorld {&lt;BR /&gt;    public native void displayHelloWorld();&lt;BR /&gt;    &lt;BR /&gt;    public static void main(String[] args) {&lt;BR /&gt;            System.loadLibrary("hello");     &lt;BR /&gt;            new HelloWorld().displayHelloWorld();  &lt;BR /&gt;    }&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;2.  javac HelloWorld.java&lt;BR /&gt;3.  javah -jni HelloWorld&lt;BR /&gt;4.  Wrote the c class&lt;BR /&gt;#include "HelloWorld.h"&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;&lt;BR /&gt;JNIEXPORT void JNICALL Java_HelloWorld_displayHelloWorld&lt;BR /&gt;  (JNIEnv *, jobject) &lt;BR /&gt;{&lt;BR /&gt;   printf("Hello World");&lt;BR /&gt;    return;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;4. aCC -ext +z -c -D_HPUX -I/opt/java/include -I/opt/java/include/hp-ux hello.c&lt;BR /&gt;&lt;BR /&gt;5. aCC -b -o libhello.sl hello.o -IC&lt;BR /&gt;&lt;BR /&gt;6. export SHLIB_PATH=$(/bin/pwd):$SHLIB_PATH&lt;BR /&gt;&lt;BR /&gt;However, when I try to run the java program using java HelloWorld, I got the &lt;BR /&gt;error java.lang.UnsatisfiedLinkError.  Anyone knows what went wrong? TIA.&lt;BR /&gt;&lt;/STDIO.H&gt;</description>
      <pubDate>Sun, 12 Dec 1999 23:12:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/java-jni-acc/m-p/2416706#M765212</guid>
      <dc:creator>Lee Yeow leong</dc:creator>
      <dc:date>1999-12-12T23:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: Java, JNI, aCC</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/java-jni-acc/m-p/2416707#M765213</link>
      <description>I guess you might need to grant executioin persmission of the share library &lt;BR /&gt;file via chmod a+x. Good luck.</description>
      <pubDate>Sun, 12 Dec 1999 23:34:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/java-jni-acc/m-p/2416707#M765213</guid>
      <dc:creator>Xian xiang Wang</dc:creator>
      <dc:date>1999-12-12T23:34:23Z</dc:date>
    </item>
    <item>
      <title>Re: Java, JNI, aCC</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/java-jni-acc/m-p/2416708#M765214</link>
      <description>The permission has already been lowered.  :(&lt;BR /&gt;&lt;BR /&gt;  Any other ideas?  tia.</description>
      <pubDate>Mon, 13 Dec 1999 16:54:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/java-jni-acc/m-p/2416708#M765214</guid>
      <dc:creator>Lee Yeow leong</dc:creator>
      <dc:date>1999-12-13T16:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: Java, JNI, aCC</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/java-jni-acc/m-p/2416709#M765215</link>
      <description>Can you try to see if you can run the demo JNI app in:&lt;BR /&gt;&lt;BR /&gt;/opt/java/docs/hpux/JavaCallingNative&lt;BR /&gt;&lt;BR /&gt;Run the "build" script and see if you still get an error similar to:&lt;BR /&gt;&lt;BR /&gt;error: java.lang.UnsatisfiedLinkError: no aCCImpl in shared library path&lt;BR /&gt;&lt;BR /&gt;If so, you may want to check what the version of your dld.sl (dynamic link &lt;BR /&gt;loader) is. Also, you may want to check what JDK version you are using. I was &lt;BR /&gt;testing with JDK1.17 and the "what" output of my dym link loader files is:&lt;BR /&gt;&lt;BR /&gt;/usr/lib/dld.sl:&lt;BR /&gt;SMART_BIND&lt;BR /&gt; 92453-07 dld dld dld.sl B.10.32 990202&lt;BR /&gt;&lt;BR /&gt;/usr/lib/libdld.1:&lt;BR /&gt;92453-07 dld dld libdld.sl B.10.32 990202&lt;BR /&gt;&lt;BR /&gt;I have PHSS_17225 dld.sl patch installed.</description>
      <pubDate>Fri, 17 Dec 1999 03:35:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/java-jni-acc/m-p/2416709#M765215</guid>
      <dc:creator>Yu-hsin Seah_2</dc:creator>
      <dc:date>1999-12-17T03:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: Java, JNI, aCC</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/java-jni-acc/m-p/2416710#M765216</link>
      <description>Thanks.  I didn't know the sample program was there.  :)&lt;BR /&gt;&lt;BR /&gt;  I able to run it and have found the problem with my code.  I have &lt;BR /&gt;misunderstood that the shared library should be prefixed with libc instead of &lt;BR /&gt;c.&lt;BR /&gt;&lt;BR /&gt;  Thank you!  Merry Christmas!</description>
      <pubDate>Sun, 19 Dec 1999 01:18:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/java-jni-acc/m-p/2416710#M765216</guid>
      <dc:creator>Lee Yeow leong</dc:creator>
      <dc:date>1999-12-19T01:18:50Z</dc:date>
    </item>
  </channel>
</rss>

