A bash script to allow ad-hoc java scripting
Make sure the "jss" script is in your path
Make sure your executable script starts with
#!/usr/bin/env jss
After which you can write java code that will be executed.
Create a file name helloworld
with the following content
#!/usr/bin/env jss
System.out.println("Hello World!");
give the file executable permissions
chmod +x helloworld
run the file
./helloworld