I have a problem with executing a command in Spring Shell. I'm using this code to blink my LED on a Raspberry PI but I'm getting a response error in the Tomcat's log.
JLineShellComponent shell;
Bootstrap bootstrap = new Bootstrap();
shell = bootstrap.getJLineShellComponent();
shell.executeCommand("gpio -g write 17 1");
shell.stop();
The log output is:
org.springframework.shell.core.SimpleParser commandNotFound
WARNING: Command 'sudo gpio -g write 17 1' not found (for assistance press TAB)
When I'm using the echo
command the problem persists.