1. A method of dispatching multiple Java Native Interface calls comprising: identifying a sequence of Java Native Interface calls to be made by native code; encapsulating the identified sequence of Java Native Interface calls into a batch; and communicating the batch as a single transition across a Java Native Interface boundary; wherein each call of the batch is encapsulated by iteratively performing for each call to be made: identifying the Java Native Interface function to call; identifying the arguments to pass into the Java Native Interface function; dispatching to the Java Native Interface function; and capturing the return value.