java support

This commit is contained in:
Brian Seymour 2018-10-05 21:11:12 -05:00
parent e050d5ae35
commit 5d8f52afd3
3 changed files with 16 additions and 6 deletions

5
docker/executors/java Executable file
View file

@ -0,0 +1,5 @@
cp /*.code .
name=$(cat $1 | grep -Eo 'public class ([A-Za-z0-9]+)' | cut -d' ' -f3)
mv $1 $name.java
timeout -s KILL 10 javac $name.java
timeout -s KILL 3 java $name ${@:3}