Debugging JNI crashes using Xcheck:jni

Recently i had a chance to debug a JNI crashing problem in windows .I was looking for some kinda utilities which help me to debug the issue . Then i found a utility
-Xcheck:jni supplied along with Java .

Java 5 trouble shooting guid says 'The -Xcheck:jni option is useful option when trying to
diagnose problems with applications that use the JavaNative Interface (JNI). This option can be be useful whenan application employs third-party libraries'

To use the -Xcheck:jni option just add it to the command line when
starting the application, for example:java -Xcheck:jni MyApplication

If you are using eclipse as IDE , you can try setting this in Debug / Run Dialog arguments section .I found this utility very useful , but it is a tedious job to analyse the crash logs this utiity generates

PS : Linux is great , whenever a crash occurs , it gives detailed logs like which method it crashed ..it rocks !!!!

0 opinions: