diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java b/jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java index a074efd51238..efb53339ddf6 100644 --- a/jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java +++ b/jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java @@ -585,6 +585,7 @@ else if (line.startsWith(directive = "add-reads:")) } } } + jmodAdds.add("ALL-MODULE-PATH"); StartLog.debug("Expanded JPMS directives:%nadd-modules: %s%npatch-modules: %s%nadd-opens: %s%nadd-exports: %s%nadd-reads: %s", jmodAdds, jmodPatch, jmodOpens, jmodExports, jmodReads); } @@ -1110,7 +1111,8 @@ public void parse(final String rawarg, String source) if ("--jpms".equals(arg)) { jpms = true; - // Need to fork because we cannot use JDK 9 Module APIs. + // Forking is simpler; otherwise we need to add the + // JPMS directives such as "--add-modules" via API. exec = true; return; } diff --git a/jetty-websocket/javax-websocket-server/src/main/config/modules/websocket.mod b/jetty-websocket/javax-websocket-server/src/main/config/modules/websocket.mod index 452096a8a155..d0136c4ca221 100644 --- a/jetty-websocket/javax-websocket-server/src/main/config/modules/websocket.mod +++ b/jetty-websocket/javax-websocket-server/src/main/config/modules/websocket.mod @@ -1,15 +1,18 @@ DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html - [description] - Enable websockets for deployed web applications +[description] +Enable websockets for deployed web applications - [depend] - # websocket client needs jetty-client - client - # javax.websocket needs annotations - annotations - - [lib] - lib/websocket/*.jar +[depend] +# websocket client needs jetty-client +client +# javax.websocket needs annotations +annotations +[lib] +lib/websocket/*.jar +[jpms] +# The implementation needs to access method handles in +# classes that are in the web application classloader. +add-reads: org.eclipse.jetty.websocket.javax.common=ALL-UNNAMED