created on | January 28, 2022 |
On Linux systems, the startup configuration is written to the file
.
Windows and Mac OS users will find the
file in the corresponding directory inside their home directory / user directory.
contains a map, each entry of the map is of the form:
This map holds any configuration setting like class path, module path, editor, etc as well as all the startup commands and the history. The term ‘kitchen sink’ comes to my mind while writing this.
Any configuration value that is set during a jshell session as well as the history is written to when the jshell terminates normally, i.e. by issuing the command . If the jshell process is terminated abruptly, i.e. by a , the configuration values set in the abruptly terminated session as well as the history are not written to .
For a file with path with the content
and the following jshell command
the following line is written to (see section ‘The jshell Configuration File’):
That is, not the file path but the contents of the file are written to the map in . Thus, after the jshell startup has been configured, any script files involved in the configuration can be moved or be deleted without affecting the startup configuration.