Patent ID: 7784043

Claim:
A method for locating a class in a virtual machine environment, comprising: determining with a computer system executing the virtual machine environment a package associated with a class name of said class to obtain available code sources associated with said package from a code-source index that relates code-sources to packages for a plurality of class loaders in a class loader tree in said virtual machine environment, wherein said code-source index comprises a first parameter comprising a plurality of class loaders associated with a class loader tree, a second parameter comprising a plurality of packages associated with a plurality of classes that are capable of being loaded by said plurality of class loaders, wherein each of said plurality of packages comprises at least one code-source for accessing said plurality of classes, a third parameter comprising a plurality of code-sources, wherein each of said plurality of code-sources is contained within one of said plurality of packages, and a mapper for mapping a package associated with a class to one or more associated code-sources that potentially can access said class in said plurality of class loaders; determining with the computer system a set of code-sources from said available code-sources that are able to access said class; and determining with the computer system a plurality of class loaders associated with said subset of code-sources and based on the class loader tree.