Patent ID: 7555746

Claim:
A method for registering a native method in a manner that permits the native method to become globally visible after a class that is designed to invoke the native method is desired for use, the method comprising: delaying loading of the class until the class is desired for use, wherein the class is designed to invoke the native method, wherein said delaying occurs even though said native method is not implemented with a dynamic library, said delaying preventing global visibility of said native method before said class is desired for use; in response to said class being desired for use, loading the class into an appropriate classloader and instantiating a class object for the class; passing an identity of the class object as a parameter to a registration method, the registration method having global visibility; and, executing the registration method to insert a function pointer to the native method into the class object, wherein the function pointer includes identification data to identify an implementation of the native method.