Skip to content

[GR-74135] Improve Java Main Class detection for abstract classes. - #14326

Merged
graalvmbot merged 1 commit into
masterfrom
chw/GR-74135/instantiation_exception
Aug 27, 2026
Merged

[GR-74135] Improve Java Main Class detection for abstract classes.#14326
graalvmbot merged 1 commit into
masterfrom
chw/GR-74135/instantiation_exception

Conversation

@graalvmbot

Copy link
Copy Markdown
Collaborator

See #13150

馃
This change fixes native-image main-entry handling for inherited instance main methods. For instance-main entrypoints, it now instantiates the configured concrete main class instead of the method鈥檚 declaring class.

To support that cleanly, main-class and main-method resolution are unified in guest-side BuildTimeSupport, which now returns both values together as MainEntryPointInfo. NativeImageGeneratorRunner consumes that result instead of trying to reconstruct main-class/module resolution on the hosted side. This avoids duplicated resolution logic and keeps class/module lookup and related error handling in the guest context, where that logic already belongs.

The change also updates the web-image main-support plumbing to pass through the configured main class with the same API shape.

@oracle-contributor-agreement oracle-contributor-agreement Bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Aug 27, 2026
@graalvmbot
graalvmbot merged commit 5036eb1 into master Aug 27, 2026
3 checks passed
@graalvmbot
graalvmbot deleted the chw/GR-74135/instantiation_exception branch August 27, 2026 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants