#!/bin/dash

set -o errexit
out=$(mktemp)
trap "rm -f $out" EXIT
java -jar "$1" - > $out
printf '\377' # 255 in octal
cat $out


#!/bin/dash

set -o errexit
out=$(mktemp)
trap "rm -f $out" EXIT
# Only lets programs run for 30 seconds
timeout 30 java -jar "$1" - > $out
printf '\377' # 255 in octal
cat $out


Add a timeout, as the user may hang it.
Add a timeout, as the user may hang it.
