Techniques for handling exceptions raised during the execution of Java
computer programs are disclosed. The techniques can be used by a Java virtual machine
to efficiently handle exceptions. A method descriptor is implemented in a Java
method frame which is stored in the Java execution stack. The method descriptor
provides one or more references to exception handlers associated with the Java
method. The references can be used to quickly identify and invoke the appropriate
exception handler. This can be achieved without having to use a native language
execution stack. As a result, the overhead associated with several returns from
native functions (routines or methods) can be avoided since the information needed
to invoke the appropriate exception handler can be obtained efficiently from the
Java execution stack. Accordingly, the performance of Java virtual machines, especially
those operating with limited resources, can be significantly enhanced.