How to execute java jshell command as inline from shell or windows commandLine
问题 Are there any way to execute java command on REPL ( jshell ) as inline command without launching it? E.g. Perl inline command $perl -e 'printf("%06d", 19)' 000019 I have to launch jshell to run any command: $jshell | Welcome to JShell -- Version 9 | For an introduction type: /help intro jshell> String.format("%06d", 19) $1 ==> "000019" I found similar question here, but it's not feasible solution to create a separate jsh file for individual command. Another solution on same post is: echo "1+2