Java as a development platform provides many contemporary features that benefit programmers, including sophisticated memory management and support for Unicode, regular expressions, and threads. The Java Native Interface (JNI) is intended to allow the Java virtual machine to interoperate freely with native libraries written in other languages. However, JNI libraries can consume system resources in ways that are unaccounted for in Java. We propose a method of allocating JNI memory directly from the Java heap, and thus limiting system resources to those specified to the JVM. This simple idea can be implemented in about 70 lines of code and can even be integrated into SWIG wrapped libraries. We also propose that an extension of this idea be made part of the JVM to bring all heap management in JNI libraries under the care of the Java garbage collection subsystem.