Patent ID: 7882496

Claim:
A method of metering execution of interpreted programs on a data processing system, the method including the steps of: an interpreted program requesting a service to an interpreter running the interpreted program, the interpreter invoking a native external function for implementing the service, wherein the native external function involves the loading of a new class, the interpreted program being identified according to the new class, intercepting the invocation of the native external function, wherein the step of intercepting the invocation of the native external function includes receiving a request for the loading of the new class by a stub class loader replacing an original class loader, wherein the step of intercepting the invocation of the native external function further includes the steps under the control of the stub class loader of: forwarding the request for the loading of the new class to the original class loader, verifying whether the loaded new class includes a main method for launching the interpreted program, and inserting a call to a verification module into the main method for determining the interpreted program when the main method is executed, identifying the interpreted program according to the native external function by accessing a catalogue which associates native functions with interpreted programs, and performing a license management operation according to the identified interpreted program.