Invoking Java from C++: how to catch/detect a fatal JVM error?
问题 I'm developing a C++ program (Win32, MS Visual Studio 2008) which creates a Java VM via JNI as outlined here. It has been working fine for a long time, with both Java 6 and Java 7. Today I have installed a new version of JRE; something went wrong in the installer, and the JRE become corrupt. I noticed that my C++ program doesn't start and doesn't issue any warning messages. Debugging the program showed that it runs successfully until the JNI_CreateJavaVM call; but calling JNI_CreateJavaVM