We don't expect a Java/JNI exception here as this part of code doesn't make any JNI callYou're running this from a native application aren't you? So you're using the Java Native Interface, only in the reverse direction (the invocation API). You even posted this in the JNI forum so you must have realized it in some way or another. Its not too strange to get a JNI exception, although its hard to say anything definitive since you refuse to share the actual error you're getting.
user2114451 wrote:Is there any JNI calls at all in any way up to that point? If so then it is suspect.
as this part of code doesn't make any JNI call
and moreover the JVM destroy call is successful before reaching this point.At least in the past that did nothing with the Oracle/Sun VM.