How to execute a java script with jshell?
Use //usr/bin/env jshell –show-version –execution local “$0” “$@”; exit $? as the first line of test.jsh. The test.jsh script could look like: //usr/bin/env jshell –show-version “$0” “$@”; exit $? System.out.println(“Hello World”) /exit The command line option –show-version is optional, of course, but gives immediate feedback that the tool is running. The extra command line option … Read more