Embedding Native Code in Java Class Files

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Platform-independent applications face challenges in efficiently incorporating native methods, leading to performance issues and increased development complexity due to the need for specific hardware adaptations and potential conflicts between different versions of native code libraries.

Innovation Solution

Embedding native code within application files, such as JAVA class files, allows it to be used as a library without being visible to the virtual machine during execution, enabling the servicing of native method requests and avoiding platform-specific dependencies and library conflicts.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If native code is incorporated into platform-independent applications, then performance is improved, but platform independence is compromised and development complexity increases

Engineering Contradiction:
Improveapplication performanceVSAvoidplatform independence
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The patent embeds native code segments directly within the bytecode application file structure, nesting the platform-specific code inside the platform-independent container. This allows the native code to be carried along with the bytecode without requiring separate native code libraries, thereby improving performance while maintaining platform independence through the self-contained application file.

Inventive Principle:
Principle #7Nested doll (Nesting)

Solution Approach 2:

The patent introduces a special section in the application file that acts as an intermediary between the bytecode interpreter and native code execution. This section contains embedded native code segments that can be conditionally executed, serving as a mediator that allows performance-critical operations to use native code while keeping the overall application platform-independent through the unified file structure.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Adaptability or versatility

If multiple versions of native code libraries are supported, then adaptability is improved, but conflicts between versions occur and system complexity increases

Engineering Contradiction:
Improvelibrary version compatibilityVSAvoidlibrary management complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent segments the application into distinct bytecode sections and embedded native code sections within the same file. Each native code segment is separately identifiable and can be independently managed, allowing different versions of native code to coexist in different segments without conflicting with each other, thereby reducing library management complexity while maintaining version compatibility.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent allows different sections of the application file to have different qualities - bytecode sections for platform independence and embedded native code sections for platform-specific optimizations. Each section can be independently processed and executed based on its specific requirements, enabling version-specific native code to be embedded locally without affecting the entire application structure.

Inventive Principle:
Principle #3Local quality

3Ease of operation

If native methods are made visible to the virtual machine, then ease of operation is improved, but platform-specific dependencies are introduced

Engineering Contradiction:
Improvenative method accessibilityVSAvoidplatform dependency
Core Design Contradiction:
Ease of operationVSAdaptability or versatility

Solution Approach 1:

The patent merges the bytecode and native code into a single application file structure, combining the platform-independent interpreter-executable code with platform-specific native code segments. This unified structure allows the virtual machine to access native methods through the same file interface it uses for bytecode, improving ease of operation while maintaining platform independence through the integrated file format.

Inventive Principle:
Principle #5Merging (Combining)

Data Source

PatentUS8510725B2Application of platform dependent routines in virtual machines by embedding native code in class files
Publication Date: 2013.08.13 ADVANCED MICRO DEVICES INC
  • US8510725B2 patent drawing
  • US8510725B2 patent drawing
  • US8510725B2 patent drawing

AI summary

The deployment of native methods in a virtual machine environment may be significantly simplified by incorporating a corresponding native code segment into the application file, such as a JAVA class file, and using the embedded native code segment for library bind operations of the corresponding class file.