09-21-2008
JNI program work with jdk 5 but not jdk6 on aix 5.3
My JNI program work with jdk 5 but not jdk6 on aix 5.3.
i.e. I compiled & tested my program with jdk 5 and it worked.
Then with the same files & directory, I run jdk6 (I installed both
jdk5 & 6) and it failed.
Why?
jdk5 is ok:
$ /usr/java5_64/jre/bin/java -d64 -jar jMultidevice.jar
jdk6 fails:
$ /usr/java6_64/jre/bin/java -d64 -jar jMultidevice.jar
SSL Connect is failing
Exception in thread "main" com.mycomp.crypto.HwCryptokiException:
function 'C_Initialize' returns 0x30
at
com.mycomp.crypto.HwCryptokiException.ThrowNew(HwCryptokiException.java:
57)
at com.mycomp.crypto.HwAPI.Initialize(Native Method)
at
com.mycomp.crypto.HwTokenManager.<init>(HwTokenManager.java:
107)
at
com.mycomp.crypto.HwTokenManager.getInstance(HwTokenManager.java:62)
at jMultidevice.jMultidevice.<init>(jMultidevice.java:32)
at jMultidevice.jMultidevice.main(jMultidevice.java:805)
$ /usr/java5_64/jre/bin/java -d64 -version
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build
pap64dev-20051104)
IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 AIX ppc64-64
j9vmap6423-20051103 (JIT enabled)
J9VM - 20051027_03723_BHdSMr
JIT - 20051027_1437_r8
GC - 20051020_AA)
JCL - 20051102
$ /usr/java6_64/jre/bin/java -d64 -version
java version "1.6.0"
Java(TM) SE Runtime Environment (build pap6460-20071123_01)
IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 AIX ppc64-64
jvmap6460-20071121_15015 (JIT enabled)
J9VM - 20071121_015015_BHdSMr
JIT - r9_20071121_1330
GC - 20071031_AA)
JCL - 20071118_01
10 More Discussions You Might Find Interesting
1. HP-UX
Hello,
J create a thread C with a JNI function via JAVA.
J have the following message (but not in each time):
Someone has an idea ?
Thank.
Unexpected Signal : 4 occurred at PC=0x78C103E0
Function=
Library=(N/A)
NOTE: We are unable to locate the function name... (0 Replies)
Discussion started by: AUBERT
0 Replies
2. Shell Programming and Scripting
Hi, everyone:
I post a new thread because previous post may sink and I hope the new one can be caught by your eyes.
I created a shell script and the script works fine. However, the mail program part on script didn't send email to my email box and it also didn't provide any traceable... (7 Replies)
Discussion started by: duke0001
7 Replies
3. HP-UX
Hi, I have a Hello World program using JNI taken from this site.
HP Unix - Java - Using Java 2 JNI on HP-UX
It builds fine and runs fine.
But if I add -AA to my compile line, I get this error.
error: java.lang.UnsatisfiedLinkError: libaCCImpl.sl: Unresolved external
Here are my build... (2 Replies)
Discussion started by: cactuar
2 Replies
4. Programming
I have an AIX 64-bit program which uses following from AIX5.3
/usr/lib/libc.a(shr_64.o)
/usr/lib/libpthread.a(shr_xpg5_64.o)
/home/jeet_xp/export/power/usr/lib/libsarpc.a(shr.o)
/unix
/usr/lib/libcrypt.a(shr_64.o)
/usr/lib/libc_r.a(shr_64.o)
... (3 Replies)
Discussion started by: jeet_xp
3 Replies
5. Solaris
I've got lots of scsi transport errors on the E2900 - the HBA was replaced once out of curiosity but the problem still exists.
Feb 15 07:03:11 ivsdbch2 scsi: WARNING: /ssm@0,0/pci@18
,600000/SUNW,jfca@1,1/fp@0,0/ssd@w5005076300c889cb,4 (ssd21):
Feb 15 07:03:11 ivsdbch2 SCSI transport... (1 Reply)
Discussion started by: kiem
1 Replies
6. Programming
I have function declaration in Java and same function definition written in C programming language.. A JNI call from Java is made to a fuction...Function would set the environment variable { putenv(cEnvString1);} using C-built -in function ..and later return the encrypted string...
putenv is... (6 Replies)
Discussion started by: shafi2all
6 Replies
7. UNIX for Dummies Questions & Answers
I am trying to make an application which works on unix to work on linux. I already tried copying the binary files and start it up but I am getting an error stating "Cannot execute binary file". Then I tried to recompile but i am getting an error whenever I tried to recompile. I am getting the... (1 Reply)
Discussion started by: khestoi
1 Replies
8. Programming
Hello, I have a technical problem: I work on AIX 7.1 with Java 1.7 (32 and 64 bit) and I make an application that intercepts certain functions related to time. In this application there is a Java JNI agent with whom I can intercept the Java "getLastModifiedTime" no problem but I am unable to... (5 Replies)
Discussion started by: steph311
5 Replies
9. Solaris
Hi guys.
By start SolarisStudio12.3 requires jdk6 or newer...
A question.
Which archiv I need download and install?
P.S. Solaris 10 (SPARC)
Solaris SPARC 73.33 MB http://www.oracle.com/ocom/groups/public/@otn/documents/digitalasset/115899.gif jdk-6u35-solaris-sparc.sh
Solaris SPARC... (9 Replies)
Discussion started by: wolfgang
9 Replies
10. AIX
Hey all. My h50 is up, but now i need some guidance.
How to i get X11 (X-Windows0 working on the system, so i can use the H50 via my main pc? is that makes sense. The X11 system is installed, but i am lost as how to get it working
Can anyone please help? (2 Replies)
Discussion started by: ADS2459
2 Replies
GJAVAH(1) GNU GJAVAH(1)
NAME
gjavah - - generate header files from Java class files
SYNOPSIS
gjavah ...
DESCRIPTION
The gjavah program is used to generate header files from class files. It can generate both CNI and JNI header files, as well as stub
implementation files which can be used as a basis for implementing the required native methods.
OPTIONS
-d DIR
Set output directory.
-o FILE
Set output file (only one of -d or -o may be used).
-cmdfile FILE
Read command file.
-all DIR
Operate on all class files under directory DIR.
-stubs
Emit stub implementation.
-jni
Emit JNI stubs or header (default).
-cni
Emit CNI stubs or header (default JNI).
-verbose
Set verbose mode.
-force
Output files should always be written.
Class path options:
-classpath PATH
Set the class path.
-IDIR
Add directory to class path.
-bootclasspath PATH
Set the boot class path.
-extdirs PATH
Set the extension directory path.
Standard options:
-help
Print help text, then exit.
-version
Print version number, then exit.
-JOPTION
Pass argument to the Java runtime.
BUGS
SEE ALSO
javac(1), ...
AUTHOR
0.98 2010-07-05 GJAVAH(1)