diff --git a/docker/executors/java b/docker/executors/java index 9a6f423..0d85a89 100755 --- a/docker/executors/java +++ b/docker/executors/java @@ -1,5 +1,5 @@ cp /*.code interim.java -name=$(cat interim.java | grep -Eo 'public class ([A-Za-z0-9]+)' | cut -d' ' -f3) +name=$(cat interim.java | grep -Eo 'public\s+class\s+([A-Za-z0-9]+)' | cut -d' ' -f3) mv interim.java $name.java timeout -s KILL 10 javac $name.java timeout -s KILL 3 java $name ${@:3} diff --git a/readme.md b/readme.md index e13dfc7..dd47d22 100644 --- a/readme.md +++ b/readme.md @@ -13,7 +13,7 @@ from from EMKC contests and challenges. It's also used in the Engineer Man Disco - `docker/execute ` #### Supported Languages -Currently python2, python3, c, c++, go, node, ruby, r, c#, nasm, and php is supported. +Currently python2, python3, c, c++, go, node, ruby, r, c#, nasm, php, and java is supported. #### Principle of Operation Piston utilizes Docker as the primary mechanism for sandboxing. There is a small API written in Go which takes