Patent ID: 8745598

Claim:
A method, comprising: including a first class in a classpath of a first class loader, the first class including a first main method and hook code; loading, by the first class loader, the first class in an object-oriented environment executing on a computer; executing, by the first main method, the hook code, the executing of the hook code performing the operations of: instantiating a second class loader; including a second class in a classpath of the second class loader, the second class including a second main method; and manipulating the object-oriented environment to use the second class loader instead of the first class loader when loading classes into the object-oriented environment, and to make the first class invisible to the second class by excluding the first class from the classpath of the second class loader; loading the second class in the object-oriented environment by the second class loader; and executing the second main method on the computer in the object-oriented environment.