Each time the JShell is launched, the startup scripts are loaded. This also occurs each time the /reset, /reload, and /env commands are used.
By default, the DEFAULT startup script is used by JShell. If you want to use a different startup script, you merely need to use the /set start <script> command. Here is an example:
/set start MyStartupScript.jsh
Alternatively, you can use the JShell start MyStartupScript.jsh command at the Command Prompt to launch JShell and load the MyStartupScript.jsh JShell startup script.
When you use the /set start <script> command with the -retain option, you are telling JShell to use the new startup script the next time you launch JShell.