#! /bin/sh set -e tmp=$(mktemp -d) trap 'cd /;rm -rf -- "$tmp"' EXIT mkdir $tmp/classes find "$@" -type f -name \*.java >$tmp/files javac -d $tmp/classes -encoding UTF-8 -source 1.5 -target 1.5 @$tmp/files cd $tmp/classes jar c *