Linking the Runtime to "libjvm.sl" on HP-UX

To call C$JAVA on HP-UX platforms, you must first relink the runtime so that it is statically linked to the "libjvm.sl" shared library. Here are instructions:

  1. Edit "Makefile", located in the ACUCOBOL-GT /lib directory. Modify the CC and EXTRA_LDFLAG entries as shown for your port below:

    32-bit Static:

    Original: CC = cc -Ae +DAportable -Wl,+s -D_LARGEFILE64_SOURCE 
    Modified: CC = cc -mt -Ae +DAportable -Wl,+s -D_LARGEFILE64_SOURCE
    Original: EXTRA_LDFLAG =
    Modified: EXTRA_LDFLAG = -L /opt/java1.5/jre/lib/PA_RISC2.0/server -ljvm
    

    32-bit Shared:

    Original: CC = cc -Ae +DAportable -Wl,+s -D_LARGEFILE64_SOURCE +z
    Modified: CC = cc -mt -Ae +DAportable -Wl,+s -D_LARGEFILE64_SOURCE +z
    Original: EXTRA_LDFLAG = -Wl,+b -Wl,$(ACUVERSPATH)/lib:$(ACUPATH)/lib:.:/usr/lib:/lib
    Modified: EXTRA_LDFLAG = -Wl,+b -Wl,$(ACUVERSPATH)/lib:$(ACUPATH)/lib:.:/usr/lib:/lib \   -L /opt/java1.5/jre/lib/PA_RISC2.0/server -ljvm
    

    64-bit Static:

    Original: CC = cc -Ae +DS2.0 +DA2.0W +DD64 -Wl,+s
    Modified: CC = cc -mt -Ae +DS2.0 +DA2.0W +DD64 -Wl,+s
    Original: EXTRA_LDFLAG = 
    Modified: EXTRA_LDFLAG = -L /opt/java1.5/jre/lib/PA_RISC2.0W/server -ljvm
    

    64-bit Shared:

    Original: CC = cc -Ae +DS2.0 +DA2.0W +DD64 -Wl,+s +z
    Modified: CC = cc -mt -Ae +DS2.0 +DA2.0W +DD64 -Wl,+s +z
    Original: EXTRA_LDFLAG = -Wl,+b -Wl,$(ACUVERSPATH)/lib:$(ACUPATH)/lib:.:/usr/lib:/lib
    Modified: EXTRA_LDFLAG = -Wl,+b -Wl,$(ACUVERSPATH)/lib:$(ACUPATH)/lib:.:/usr/lib:/lib \  -L /opt/java1.5/jre/lib/PA_RISC2.0W/server -ljvm
  2. Rebuild the runtime. In the ACUCOBOL-GT /lib directory execute "make runcbl".
  3. Copy the new "runcbl" to the ACUCOBOL-GT /bin directory.
  4. Set the following in the runtime configuration file:

    32-bit:

    JAVA_LIBRARY_NAME /opt/java1.5/jre/lib/PA_RISC2.0/server/libjvm.sl

    64-bit:

    JAVA_LIBRARY_NAME /opt/java1.5/jre/lib/PA_RISC2.0W/server/libjvm.sl 
    All:
    JAVA_OPTIONS -XX:+UseAltSigs
  5. Set the following in the environment:

    32-bit:

    SHLIB_PATH=/opt/java1.5/jre/lib/PA_RISC2.0/server:/opt/java1.5/jre/lib/PA_RISC2.0;$SHLIB_PATH
    

    64-bit:

    LD_LIBRARY_PATH=/opt/java1.5/jre/lib/PA_RISC2.0W/server:/opt/java1.5/jre/lib/PA_RISC2.0W;$LD_LIBRARY_PATH