gpt4 book ai didi

java - Windows 操作系统命令不在 Spring Shell 中执行

转载 作者:行者123 更新时间:2023-12-01 13:21:38 25 4
gpt4 key购买 nike

我正在使用 spring shell 开发命令行界面应用程序,我在 Windows 机器上遇到一个问题,在 Linux 机器上我可以使用 !<OS Command> 执行操作系统命令,但这在 Windows 机器上不起作用。 Spring shell 说

Unable to execute command, The system can not find the specified command .

请告诉我如何在 Windows 平台上运行的 Spring shell 中执行 Windows 命令(日期、时间、路径等命令)

提前致谢。

最佳答案

日期、时间、路径等是Windows命令外壳的内置命令。看来这些内置命令在 spring-shell 中不可用,并且 spring-shell 会处理在 Windows 路径中作为文件真实存在的命令。

可以使用非内置的 Windows 命令,例如 calc (!calc)。

关于java - Windows 操作系统命令不在 Spring Shell 中执行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21979506/

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