I'm working on java web app which uses some external JAR lib with native C++ libraries. From time to time one of the methods from C++ libraries causes SIGSEGV which terminates my tomcat app. Is there any good way to extract this small piece of java code with native library to prevent my app from being terminated? I would like to make a call to this extracted part of code and if SIGSEGV occurs it should not impact on my whole web app and java VM. Any idea?
- It's not an Android platform
- SIGSEGV in JNI code will generally crash the JVM before control is returned to your Java code.