This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch launcher-native-access in repository https://gitbox.apache.org/repos/asf/camel.git
commit a9637001e28047e4438ca47ba21d1c19d618a024 Author: Claus Ibsen <[email protected]> AuthorDate: Mon Nov 9 11:51:42 2026 +0100 chore: camel-launcher - enable native access in the manifest, so Java 24+ does not warn when JLine uses the FFM API JLine drives the terminal through the FFM API, and since Java 24 (JEP 472) the JVM warns about restricted methods unless native access is enabled. The JBang launcher already passes --enable-native-access=ALL-UNNAMED; the launcher distribution did not. Add Enable-Native-Access: ALL-UNNAMED to the manifest of the thin launcher JAR in lib/ (bin/camel.sh, camel.bat and camel.exe start it with -jar) and of the self-executing JAR (the container starts it with -jar), so it applies whatever JAVA_OPTS is set to. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Claus Ibsen <[email protected]> --- dsl/camel-jbang/camel-launcher/pom.xml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/dsl/camel-jbang/camel-launcher/pom.xml b/dsl/camel-jbang/camel-launcher/pom.xml index aed071e6eaf1..225ae2979360 100644 --- a/dsl/camel-jbang/camel-launcher/pom.xml +++ b/dsl/camel-jbang/camel-launcher/pom.xml @@ -304,6 +304,19 @@ <build> <plugins> + <!-- the repackaged self-executing JAR keeps this manifest --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <configuration> + <archive> + <manifestEntries> + <!-- JLine uses the FFM API for the terminal (JEP 472: Java 24+ warns without it) --> + <Enable-Native-Access>ALL-UNNAMED</Enable-Native-Access> + </manifestEntries> + </archive> + </configuration> + </plugin> <!-- Create self-executing JAR using Spring Boot loader tools --> <plugin> <groupId>org.apache.camel</groupId> @@ -352,6 +365,10 @@ <useUniqueVersions>false</useUniqueVersions> <addDefaultImplementationEntries>true</addDefaultImplementationEntries> </manifest> + <manifestEntries> + <!-- JLine uses the FFM API for the terminal (JEP 472: Java 24+ warns without it) --> + <Enable-Native-Access>ALL-UNNAMED</Enable-Native-Access> + </manifestEntries> </archive> </configuration> </execution>
