In a C ++ project, I use the JNI call API to start the JVM. I made a small wrapper for the JVM, so I can use all the necessary parts in OO style. So far, this works great.
Now, if the JVM does not start ( JNI_CreateJavaVM returns <0), I would like to throw an exception in my C ++ code. But if I make an exception after JNI_CreateJavaVM , I will get a buffer overrun. If I throw an exception without calling JNI_CreateJavaVM , it works as expected.
Does anyone know what could be here? Or how to debug this?
Environment: Windows, Visual Studio 2008 JDK: jrockit27.6jdk16005, but also with SUN.
Greetings Dominik
c ++ exception jni
Dominik Fretz
source share