Skip to content

Instantly share code, notes, and snippets.

@rainyear
Created June 24, 2013 05:44
Show Gist options
  • Save rainyear/5847961 to your computer and use it in GitHub Desktop.
Save rainyear/5847961 to your computer and use it in GitHub Desktop.
compile and run java script
[ -f "$1.class" ] && rm $1.class
for file in $1.java
do
echo "Compiling $file........"
javac $file
done
if [ -f "$1.class" ]
then
echo "-----------OUTPUT-----------"
java $1
else
echo " "
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment