How to shutdown jshell at the end of the script?

前端 未结 2 662
轮回少年
轮回少年 2021-02-05 01:27

How to instruct jshell to terminate at the end of the script similarly to interpreters of other languages like for example python3 or node

2条回答
  •  逝去的感伤
    2021-02-05 01:41

    Another possibility is to have an exit file:

    exit.jsh

    /exit
    

    And then run:

    ./jshell --startup myscript.jsh --startup exit.jsh
    

提交回复
热议问题