A computer implemented method for executing an application comprising a first load module that calls a second load module for a source architecture on a machine having a target architecture, the source architecture being a mainframe architecture, the method comprising: loading by a loader, a first load module comprising object code that calls a second load module in a legacy application environment, LAE, the LAE corresponding to a legacy mainframe environment executing on top of the target architecture; detecting by the loader that at least one CSECT in the second load module has an associated replacement Java program, wherein said detecting comprises: determining that said second load module has been replaced by inspecting metadata of said second load module, and performing by said loader, a table lookup to determine whether an individual CSECT within said second load module has been replaced; inserting into memory of the LAE by the loader, a CSECT comprising an Execute Native Command, ENC, instruction corresponding to the replacement Java program; identifying a signature type indicative of the number and structure of input and output parameters of said replacement Java program, and inserting a signature type identifier in said memory area for each said replacement Java program; provisioning a java virtual machine, JVM executing on the target platform; executing, from said LAE using a binary JVM interface, a native program associated with said ENC instruction, wherein the binary JVM interface permits programs of the first load module to make calls to or to respond to calls from Java code running in the JVM, wherein said native program: (a) attaches its thread to the JVM; (b) adds a classpath of said replacement Java program and method name to the memory of the JVM; (c) loads a replacement Java program class corresponding to the replacement Java program using the classpath in the JVM; (d) constructs a signature comprising the input parameters structured according to said signature type and memory allocation appropriate to the output parameters of said signature type, in the memory of the JVM; (e) invokes a method of said replacement Java program class corresponding to said method name; and (f) detaches itself from said JVM. loading by a loader, a first load module comprising object code that calls a second load module in a legacy application environment, LAE, the LAE corresponding to a legacy mainframe environment executing on top of the target architecture; detecting by the loader that at least one CSECT in the second load module has an associated replacement Java program, wherein said detecting comprises: determining that said second load module has been replaced by inspecting metadata of said second load module, and performing by said loader, a table lookup to determine whether an individual CSECT within said second load module has been replaced; determining that said second load module has been replaced by inspecting metadata of said second load module, and performing by said loader, a table lookup to determine whether an individual CSECT within said second load module has been replaced; inserting into memory of the LAE by the loader, a CSECT comprising an Execute Native Command, ENC, instruction corresponding to the replacement Java program; identifying a signature type indicative of the number and structure of input and output parameters of said replacement Java program, and inserting a signature type identifier in said memory area for each said replacement Java program; provisioning a java virtual machine, JVM executing on the target platform; executing, from said LAE using a binary JVM interface, a native program associated with said ENC instruction, wherein the binary JVM interface permits programs of the first load module to make calls to or to respond to calls from Java code running in the JVM, wherein said native program: (a) attaches its thread to the JVM; (b) adds a classpath of said replacement Java program and method name to the memory of the JVM; (c) loads a replacement Java program class corresponding to the replacement Java program using the classpath in the JVM; (d) constructs a signature comprising the input parameters structured according to said signature type and memory allocation appropriate to the output parameters of said signature type, in the memory of the JVM; (e) invokes a method of said replacement Java program class corresponding to said method name; and (f) detaches itself from said JVM. (a) attaches its thread to the JVM; (b) adds a classpath of said replacement Java program and method name to the memory of the JVM; (c) loads a replacement Java program class corresponding to the replacement Java program using the classpath in the JVM; (d) constructs a signature comprising the input parameters structured according to said signature type and memory allocation appropriate to the output parameters of said signature type, in the memory of the JVM; (e) invokes a method of said replacement Java program class corresponding to said method name; and (f) detaches itself from said JVM.