Open cowwoc opened 3 months ago
Adding --enable-native-access=org.eclipse.jetty.quic.quiche.foreign
should be enough. I'm not aware of any way to suppress that warning with code, but indeed, we could add a section to the documentation.
I just tried this and got WARNING: Unknown module: org.eclipse.jetty.quic.quiche.foreign specified to --enable-native-access
which is weird given that this is the right module name. Maybe I need to pass this to the Maven compiler plugin instead of the top-level Maven process itself...
Hmm, nope. Passing this to the compiler does not work (error: invalid flag: --enable-native-access
) which makes sense now that I think about it...
So it's not clear why this is failing. Per https://docs.oracle.com/en/java/javase/22/core/restricted-methods.html it should work the way you mentioned.
Nevermind, -DMAVEN_OPTS=--enable-native-access=org.eclipse.jetty.quic.quiche.foreign
seems to work.
@sbordet where should that be reflected in the docs in your opinion?
My vote would be somewhere close to https://eclipse.dev/jetty/documentation/jetty-12/programming-guide/index.html#pg-server-http3-setup
Jetty version(s) 12.0.9
Jetty Environment core
Java version/vendor
(use: java -version)
openjdk 22.0.1 2024-04-16 OpenJDK Runtime Environment (build 22.0.1+8-16) OpenJDK 64-Bit Server VM (build 22.0.1+8-16, mixed mode, sharing)OS type/version Microsoft Windows [Version 10.0.19045.4412]
Description When starting a server, I get the following warning:
How to reproduce? Launch a new Server with HTTP/3 support
Expected behavior: Find a way to suppress this warning from within Jetty, or add a section to the programmer/operation guides explaining what to do.
In particular, I am wondering why we need to
enable-native-access
toALL-UNNAMED
. Shouldn't we be able to limit access to a specific Java Module?