Java spring-shell-standard cli program failed to perform only under Snap

Solved by adding to the command < /dev/tty e.g java -jar myjar.jar < /dev/tty