From d72512be18c4dec213b6c5a2bc75efbfdfb27d16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luka=20Barbi=C4=87?= Date: Fri, 30 Oct 2020 21:28:51 +0100 Subject: [PATCH] Allow use of interface --- lxc/executors/java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lxc/executors/java b/lxc/executors/java index 822e67d..9cbc6f7 100755 --- a/lxc/executors/java +++ b/lxc/executors/java @@ -1,6 +1,6 @@ cd /tmp/$2 cp code.code interim.java -name=$(cat interim.java | grep -Eo 'public\s+class\s+([A-Za-z0-9]+)' | sed -n 's/ */ /gp' | cut -d' ' -f3) +name=$(cat interim.java | grep -Eo '(public\s+class|interface)\s+([A-Za-z0-9]+)' | sed -n 's/ */ /gp' | cut -d' ' -f3) mv interim.java $name.java timeout -s KILL 10 javac $name.java runuser runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 java $name"