Method for dynamically transforming the bytecode of Java virtual machine machine bootstrap classes

Michael Rasmussen (Opfinder), Gregersen Allan Raundahl (Opfinder), Jorgensen Bo Norregaard (Opfinder)

Publikation: Patent

Abstract

Under the present invention, a method for dynamically transforming the bytecode of Java Virtual Machine (JVM) bootstrap classes during program startup is provided. A JVM agent is used to intercept the execution flow before the execution of the special program startup-method of a JVM compliant computer program. The said JVM Agent executes code to transform the bytecode of the already loaded JVM bootstrap classes, storing the new set of modified bootstrap classes onto data storage. Subsequently, the JVM Agent intercepts all class loading events transforming the bytecode of classes declaring a special program statrup-method. In those classes the bytecode within the method body of the special class-initialize method, as defined in the present JVM class file format as "", is removed to avoid any side-effects in the program. The special program startup-method in the said classes is transformed to insert bytecode at the beginning of the method to invoke a special callback method, as declared within the said JVM Agent, passing as parameters to the callback method the main arguments as passed to the JVM upon program startup. Subsequently, when the said callback method intercepts the execution flow it starts a second JVM instance passing to it the obtained input parameters, the main method arguments as well as a JVM input argument to use the stored set of modified bootstrap classes.

OriginalsprogEngelsk
IPCG06F 9/ 455 A I
PatentnummerUS 9141415 B2
Land/OmrådeDanmark
StatusUdgivet - 22. sep. 2015

Fingeraftryk

Dyk ned i forskningsemnerne om 'Method for dynamically transforming the bytecode of Java virtual machine machine bootstrap classes'. Sammen danner de et unikt fingeraftryk.

Citationsformater