Search code examples
javaspring-shell

Windows OS commands are not executing in Spring Shell


I am using spring shell to develop command line interface application, I am facing one issue in windows machine, On Linux machine i am able to execute OS commands by using !<OS Command>, but this is not working in windows machine. Spring shell says

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

Please let me know how can i execute windows command in Spring shell running in windows platform( commands like date, time,path etc)

Thanks in advance.


Solution

  • date, time, path, etc. are built-in commands of the windows command shell. It seems that these built-in commands are not available within spring-shell and spring-shell looks after commands which exist real as file in the windows path.

    Windows-Commands like calc (! calc) which are not built-in are available.