Java .Net Interop Compiler via Native Code Generation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for accessing .Net library functionality from a Java program or vice versa are often bulky or slow, particularly when using web services.
Innovation Solution
Processing managed runtime language code to generate intermediate code, such as C++ code, and converting it into linking code that allows interaction between different managed runtime languages, including generating stubs and mixed mode assembly code to facilitate interoperability between .Net and Java environments.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If web services are used to access library functionality between .Net and Java, then interoperability is achieved, but performance becomes bulky and slow
Solution Approach 1:
The patent introduces an intermediary code generation system that creates native code wrappers and stubs as intermediaries between .Net and Java environments. These intermediaries enable direct function calls without going through the bulky web service layer, thus maintaining interoperability while significantly improving performance by eliminating the overhead of web service communication.
Solution Approach 2:
The patent replaces the mechanical web service communication mechanism with a direct native code invocation mechanism. By generating C++ wrapper code and mixed-mode assemblies that can be directly called from both .Net and Java, the system substitutes the slow web service protocol with fast native interop, achieving both versatility and high performance.
2Adaptability or versatility
If web services are used for library access, then cross-language functionality is provided, but system complexity increases
Solution Approach 1:
The patent extracts the interop complexity from the application layer and consolidates it into a code generation system. By taking out the complex marshaling and communication logic and embedding it into generated native wrappers and stubs, the system reduces the complexity burden on the application developers while maintaining cross-language functionality.
Solution Approach 2:
The patent creates a universal code generation platform that can handle multiple language pairs (.Net to Java, Java to .Net) through a single integrated system. This multi-functional approach consolidates complexity into one system rather than requiring separate solutions for each language combination, thereby reducing overall system complexity while providing broad cross-language support.
Data Source
AI summary
A computer implemented method analyzing a first code in a first managed computer language and generating intermediate code in a completed language. The intermediate code into linking code that allows the second code in a second managed runtime language to interact with the first code.


