A method of automatically virtualizing core native libraries of a virtual
machine is disclosed. In an embodiment, the virtual machine is a java
virtual machine (JVM). In this technique, the interface between the
virtual machine and the core native libraries is controlled, since
multiple instances of a core native library are loaded into the same
process based on the number of co-located applications. Moreover, the
interactions between the core native libraries and the underlying
operating system (OS) are controlled so that a single point of contact is
presented to the OS. Also, the dependencies the core native libraries may
have on the virtual machine are handled.