Skip to content

Replace java.lang.reflect.Proxy with a custom generator for COM interface proxies - #7

Merged
tonyroberts merged 0 commit into
exceljava:masterfrom
tonyroberts:fix-99
Aug 27, 2026
Merged

tonyroberts merged 0 commit into
exceljava:masterfrom
tonyroberts:fix-99

Conversation

@tonyroberts

Copy link
Copy Markdown
Collaborator

Proxy packs a reflective Method lookup for every interface method into a single generated , which overflows the JVM's 64KB per-method limit for COM interfaces with hundreds of members (e.g. Excel's Application) on JDK 15+. ProxyFactory generates a small per-method thunk instead, so no generated method's bytecode scales with interface size.

Fixes kohsuke#99

tonyroberts added a commit that referenced this pull request Aug 27, 2026
@tonyroberts

Copy link
Copy Markdown
Collaborator Author

Merged in fa4aaa0

@tonyroberts tonyroberts reopened this Aug 27, 2026
@tonyroberts tonyroberts reopened this Aug 27, 2026
@tonyroberts
tonyroberts merged commit 3b82d33 into exceljava:master Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

java.lang.reflect.Proxy fails with MethodTooLargeException on large COM interfaces (JDK 15+)

1 participant