Skip to content

Commit be45de1

Browse files
lahodajAlex Buckley
andcommitted
8328627: JShell documentation should be clearer about "remote runtime system"
Co-authored-by: Alex Buckley <abuckley@openjdk.org> Reviewed-by: asotona
1 parent 8648890 commit be45de1

File tree

2 files changed

+28
-14
lines changed

2 files changed

+28
-14
lines changed

src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n.properties

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -218,11 +218,19 @@ where possible options include:\n\
218218
\ -q Quiet feedback. Same as: --feedback concise\n\
219219
\ -s Really quiet feedback. Same as: --feedback silent\n\
220220
\ -v Verbose feedback. Same as: --feedback verbose\n\
221-
\ -J<flag> Pass <flag> directly to the runtime system.\n\
222-
\ Use one -J for each runtime flag or flag argument\n\
223-
\ -R<flag> Pass <flag> to the remote runtime system.\n\
224-
\ Use one -R for each remote flag or flag argument\n\
225-
\ -C<flag> Pass <flag> to the compiler.\n\
221+
\ -J<flag> passes <flag> to the runtime system, but has no effect\n\
222+
\ on the execution of code snippets. To specify flags\n\
223+
\ that affect the execution of code snippets, use\n\
224+
\ -R<flag>. Alternatively, use -J<flag> with\n\
225+
\ --execution local.\n\
226+
\ -R<flag> passes <flag> to the runtime system only when code\n\
227+
\ snippets are executed. For example, -R-Dfoo=bar\n\
228+
\ means that execution of the snippet\n\
229+
\ System.getProperty("foo") will return "bar".\n\
230+
\ -C<flag> passes <flag> to the Java compiler inside JShell.\n\
231+
\ For example, -C-Xlint enables all the recommended\n\
232+
\ lint warnings, and -C--release=<N> compiles for\n\
233+
\ Java SE N, as if --release N was specified.\n\
226234
\ Use one -C for each compiler flag or flag argument\n\
227235
\ --version Print version information and exit\n\
228236
\ --show-version Print version information and continue\n\

src/jdk.jshell/share/man/jshell.1

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,10 @@ module.
122122
Specifies the root modules to resolve in addition to the initial module.
123123
.TP
124124
\f[V]-C\f[R]\f[I]flag\f[R]
125-
Provides a flag to pass to the compiler.
126-
To pass more than one flag, provide an instance of this option for each
127-
flag or flag argument needed.
125+
passes \f[I]flag\f[R] to the Java compiler inside JShell.
126+
For example, \f[V]-C-Xlint\f[R] enables all the recommended lint
127+
warnings, and \f[V]-C--release=<N>\f[R] compiles for Java SE N, as if
128+
--release N was specified.
128129
.TP
129130
\f[V]--class-path\f[R] \f[I]path\f[R]
130131
Specifies the directories and archives that are searched to locate class
@@ -187,9 +188,12 @@ Prints a summary of nonstandard options and exits the tool.
187188
Nonstandard options are subject to change without notice.
188189
.TP
189190
\f[V]-J\f[R]\f[I]flag\f[R]
190-
Provides a flag to pass to the runtime system.
191-
To pass more than one flag, provide an instance of this option for each
192-
flag or flag argument needed.
191+
passes \f[I]flag\f[R] to the runtime system, but has no effect on the
192+
execution of code snippets.
193+
To specify flags that affect the execution of code snippets, use
194+
\f[V]-R\f[R]\f[I]flag\f[R].
195+
Alternatively, use \f[V]-J\f[R]\f[I]flag\f[R] with
196+
\f[V]--execution local\f[R].
193197
.TP
194198
\f[V]--module-path\f[R] \f[I]modulepath\f[R]
195199
Specifies where to find application modules.
@@ -208,9 +212,11 @@ Sets the feedback mode to \f[V]concise\f[R], which is the same as
208212
entering \f[V]--feedback concise\f[R].
209213
.TP
210214
\f[V]-R\f[R]\f[I]flag\f[R]
211-
Provides a flag to pass to the remote runtime system.
212-
To pass more than one flag, provide an instance of this option for each
213-
flag or flag argument to pass.
215+
passes \f[I]flag\f[R] to the runtime system only when code snippets are
216+
executed.
217+
For example, \f[V]-R-Dfoo=bar\f[R] means that execution of the snippet
218+
\f[V]System.getProperty(\[dq]foo\[dq])\f[R] will return
219+
\f[V]\[dq]bar\[dq]\f[R].
214220
.TP
215221
\f[V]-s\f[R]
216222
Sets the feedback mode to \f[V]silent\f[R], which is the same as

0 commit comments

Comments
 (0)