false, "message" => "CSRF token mismatch", "csrf" => csrf_token(), ]); exit; } $srcDir = __DIR__ . "/../_runners/$id/src"; mkdir($srcDir, recursive: true); file_put_contents($srcDir . "/Program.java", $code); chdir(__DIR__ . "/.."); $resultStr = shell_exec("./compile-and-run.sh '$id' Program 2>/dev/null"); chdir(__DIR__); $csrf = csrf_token(); if (is_string($resultStr)) { $result = json_decode($resultStr, true); $result["runner"] = $id; $result["ok"] = true; $result["csrf"] = $csrf; } echo json_encode($result); exit; } $csrf = csrf_token(); ?> Java

☕️ Java Compiler

Powered by Eclipse Temurin