From d095413aee4d4276337fc3e73c07d128ff4c6e14 Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Thu, 15 Nov 2018 16:38:10 +0100 Subject: [PATCH] Added additional JPMS section. Signed-off-by: Simone Bordet --- .../administration/startup/startup-jpms.adoc | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/jetty-documentation/src/main/asciidoc/administration/startup/startup-jpms.adoc b/jetty-documentation/src/main/asciidoc/administration/startup/startup-jpms.adoc index ec0a8c9c13b..51f3b6b2984 100644 --- a/jetty-documentation/src/main/asciidoc/administration/startup/startup-jpms.adoc +++ b/jetty-documentation/src/main/asciidoc/administration/startup/startup-jpms.adoc @@ -156,3 +156,37 @@ add-opens: /=(,)* add-exports: /=(,)* add-reads: =(,)* .... + +[[jpms-module-path-alternative]] +==== Alternative way to start Jetty on the module-path + +The section above uses the `--jpms` command line option to start Jetty on the module-path. +An alternative way of achieving the same result is to use a Jetty module, `$JETTY_BASE/modules/jpms.mod`, +that specifies that you want to run using JPMS (and possibly add some JPMS specific configuration). + +[source, screen, subs="{sub-order}"] +.jpms.mod +.... +[ini] +--jpms + +[jpms] +# Additional JPMS configuration. +.... + +The `[ini]` section is equivalent to passing the `--jpms` option to the command line. +The `[jpms]` section (see also the link:#jpms-advanced-config[advanced JPMS configuration section]) +allows you specify additional JPMS configuration. + +[source, screen, subs="{sub-order}"] +.... +$ mkdir jetty-base-jpms +$ cd jetty-base-jpms +$ mkdir modules +# Copy the jpms.mod file above into the $JETTY_BASE/modules/ directory. +$ cp /tmp/jpms.mod modules/ +# Add both the http and the jpms modules. +$ java -jar $JETTY_HOME/start.jar --add-to-start=http,jpms +# Jetty will start on the module-path. +$ java -jar $JETTY_HOME/start.jar +....