RFR: 8346778: Enable native access should work with the source launcher

Christian Stein cstein at openjdk.org
Wed Jan 8 11:42:18 UTC 2025


Please review this change request enabling native access in source launch mode when using a modular setup.

The change comes in two parts:
1. Prevent warnings of unknown modules being emitted from module bootstrap for user module not being present in the boot layer: `java.c` and `ModuleBootstrap.java`
2. Enable native access in source module(s) and also user modules on the module path as requested by `--enable-native-access` via the `ModuleLayer.Controller` API - and emit warning for unknown modules: `MemoryContext.java`

-------------

Commit messages:
 - Streamline and document internal property: `jdk.internal.java.launchmode`
 - Handle user modules on the module path
 - Fix build by introducing an internal launch mode flag
 - Initial support for enable native access in source launch mode

Changes: https://git.openjdk.org/jdk/pull/22930/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=22930&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8346778
  Stats: 73 lines in 6 files changed: 58 ins; 0 del; 15 mod
  Patch: https://git.openjdk.org/jdk/pull/22930.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/22930/head:pull/22930

PR: https://git.openjdk.org/jdk/pull/22930


More information about the compiler-dev mailing list