Skip to main content


No replies
Joined: 2008-07-17

Hi Guys,

i was written one program in Java that calls natvi implemented methods.

suppose code is like
in java

testNative(a,null, null,true); < - here we pass null args to natvie method
} catch(Throwable e) {

in c

jni_testNative( env,jobj, jsting, jstring,jstring, jstring)
char * user=NULL;
user =stringConvertToC(env,jsting);

strinConvertToC(env, jstr) {
if(jstr==NULL) {
ThrowNew(env, "java\lang\NullPoinExce", "stringConvertToC");

It is working fine jdk 1.4 , here we pass null to natve even it not generate exception , I think here exception goes to pending, execution go to follows. But in Jdk 1.6 it generate nullpointerexception immeadiately.

Can we have any difference in JDK 1,.4 JDK1.6 JNI

Can u share ur valuable suggestions?