Created
June 24, 2013 05:44
-
-
Save rainyear/5847961 to your computer and use it in GitHub Desktop.
compile and run java script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ -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