- Java 9:Building Robust Modular Applications
- Dr. Edward Lavieri Peter Verhas Jason Lee
- 117字
- 2025-04-04 17:08:34
Start up scripts
Each time the JShell is launched, the start up scripts are loaded. This also occurs each time the /reset, /reload, and /env commands are used.
By default, the DEFAULT start up script is used by JShell. If you want to use a different start up 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 start up script.
When you use the /set start <script> command with the -retain option, you are telling JShell to use the new start up script the next time you launch JShell.