Patent attributes
A virtual machine method and system that includes shared loader importation and selective searching. For example, shared loader is stored for importation into a loader tree by executing a shared loader process. In one exemplary implementation, a shared loader search includes determining if a class is in the cache. If not in the cache, a determination is made if the class is in the parent. If the class is not in the parent, previously imported shared loaders of the child are searched. Finally, if the class is not in the shared loaders a determination is made if the class is in a local code source. In one exemplary implementation, an annotated class not found exception is produced if the class is not in a local code source. Shared loaders are selectively imported.