主权项 |
1. A method for use in a first program execution environment, the method comprising:
creating a first map for looking up a class loader by a lookup identifier based, at least in part, on that class loader's first-loaded class; receiving code compiled in a second program execution environment, which code includes: (i) a native class pointer to a target class loaded by a class loader in the second program execution environment, and (ii) an associated lookup identifier based, at least in part, on a first-loaded class of the class loader in the second program execution environment; looking up in the first map, using the associated lookup identifier, a class loader in the first program execution environment; seeking, via a referential identifier of the found class loader, a current native class pointer to the target class; and responsive to finding the current native class pointer, updating the native class pointer in the received code with the current native class pointer. |