gpt4 book ai didi

java - 如何退出 Nashorn jjs 命令行工具?

转载 作者:行者123 更新时间:2023-11-29 08:39:20 24 4
gpt4 key购买 nike

如果我通过 jjs 启动 Nashorn CLI,我无法在不使用 ctrlc 的情况下干净地退出它。

我试过:

  • 退出
  • 退出
  • System.exit()

但都没有用。

最佳答案

根据 documentation :

quit()
exit()

These functions are synonymous, causing the current script process to exit to the system.

You can pass an integer value as the argument that represents the exit code to be returned to the system. By default, without an argument, the exit code is set to 0, meaning that the process terminated correctly.

输入 exit()quit() 退出 Nashorn shell。

关于java - 如何退出 Nashorn jjs 命令行工具?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41495141/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com