Documentation Contents
Java Platform, Standard Edition Troubleshooting Guide
Contents    Previous    Next

7.4 Handle Exceptions using Java HotSpot VM

The HotSpot VM installs a top-level exception handler during initialization using the SetUnhandledExceptionFilter API for 32-bit systems, or the AddVectoredExceptionHandler API for 64-bit systems.

It also installs the win32 SEH using a __try /__except block in C++ around the thread (internal) start function call for each thread created.

Finally, it installs an exception handler around JNI functions.

If an application must handle structured exceptions in JNI code, it can use __try /__except statements in C++. However, if it must use the vectored exception handler in JNI code then the handler must return EXCEPTION_CONTINUE_SEARCH to continue to the VM's exception handler.

In general, there are two categories of situations in which exceptions arise:

Contents    Previous    Next

Oracle and/or its affiliates Copyright © 1993, 2015, Oracle and/or its affiliates. All rights reserved.
Contact Us