Re: JNI FindClass(java/lang/string) causes core dump on AIX 5.2



Thanks for quick reply Thomas.
This is only sample program. Things works fine if I use classes inside
java package.
For any other class inside my jar, FindClass coredumps with JRE
1.5.0,but works
with JRE 1.4.0.
Any clues, why it core dumps??

Thanks,
Abhijit

Thomas Fritsch wrote:
abhijit.dhariya@xxxxxxxxx wrote:
I have a sample program, please see below.
This program exe runs fine with JRE 1.4 on AIX 5.2.
But same exe causes core dump with JRE 1.5 on AIX5.2.

Any idea why this should happen?
jclass cls = env->FindClass("java/lang/string");
You probably mean "java/lang/String" with capital "S".
Otherwise you'll get cls = NULL returned by FindClass(...)
which might well result in a crash in the following lines.
//jmethodID mid = env->GetStaticMethodID(cls, "test", "(I)V");
//env->CallStaticVoidMethod(cls, mid, 100);


--
"Thomas:Fritsch$ops:de".replace(':','.').replace('$','@')

.



Relevant Pages