Java

HP-UX 에서 JNI 테스트

_침묵_ 2006. 5. 12. 22:39

#!/bin/sh
# STEP. 1
#aCC -Ae +u4 +z +DAportable -c -I/opt/java1.4/include -I/opt/java1.4/include/hp-ux HelloWorldImp.c
# STEP. 2
#ld -b -o libhelloworld.sl HelloWorldImp.o
#cc -Ae +u4 +z -c -D_HPUX -DNATIVE -D_POSIX_C_SOURCE=199506L  -I/opt/java1.4/include -I/opt/java1.4/include/hp-ux   HelloWorldImp.c
#ld -b -o libhelloworld.sl HelloWorldImp.o

aCC -Ae +u4 +z  +DAportable -c  -I/opt/java1.4/include -I/opt/java1.4/include/hp-ux   HelloWorldImp.c
ld -b -o libhello.sl HelloWorldImp.o

#java -cp . -Djava.library.path=. HelloWorld
#Linux :
#      JDK 1.1.7:
#      gcc -shared -I/usr/java/include \
#           -I/usr/java/include/genunix \
#           -o libcimx.so cimx.c NativeStringUtil.c
#
#      JDK 1.1.8:
#      gcc -shared -I/usr/java/include \
#           -I/usr/java/include/linux \
#           -o libcimx.so cimx.c NativeStringUtil.c
#
#Solaris : cc -G -I/usr/java/include \
#           -I/usr/java/include/solaris \
#           -o libcimx.so cimx.c NativeStringUtil.c
#
#Windows : cl -Ic:\jdk1.1.7\include -Ic:\jdk1.1.7\include\win32 \
#           -LD cimx.c NativeStringUtil.c -Fcimx.dll
#
#HP-UX : cc -Ae +u4 +z -c -D_HPUX -DNATIVE -D_POSIX_C_SOURCE=199506L \
#          -I/opt/java/include -I/opt/java/include/hp-ux \
#          cimx.c NativeStringUtil.c
#        ld -b -o libcimx.sl cimx.o NativeStringUtil.o
#
#       http://www.unixsolutions.hp.com/products/java/HPUX_JNI.html
#
#AIX :   xlc_r -c -I. -I${JAVA_HOME}/include -I${JAVA_HOME}/include/aix \
#           cimx.c NativeStringUtil.c
#        ld -o libcimx.so cimx.o NativeStringUtil.o \
#           -bnoentry -bM:SRE -bE:cimx.exp \
#           -blibpath:/lib/usr/lib -lc_r \
#           -L${JAVA_HOME}/lib/aix/native_threads -ljava