Repository navigation
feat: Add Java and Kotlin support to sandbox #29
Description
Activity
- addedhelp wantedExtra attention is neededExtra attention is needed
on Apr 13, 2026 Status — half-shipped. The sandbox restructure in V3.1.0 (PC-191/192/193) added language-agnostic layout detection that recognizes Java and C/C++ project layouts and picks the right runner. From the CHANGELOG: "Detects Python, Node, Go, Rust, Java, C/C++ project layouts and uses the appropriate runner."
What's still missing for this ticket: actual Java / Kotlin runtime install in the sandbox container, and the executor entries.
sandbox/executor_server.pystill gates onpython | javascript | typescript | go | rust | c | cpp | bash, and the Dockerfile doesn't installopenjdkorkotlinc. Layout detection is the harder half; runtime install is mostly a Dockerfile addition + executor wiring once someone wants to claim it.Hi @itigges22, I'd like to pick this up!
I've read through the codebase and your status update — layout detection is already in place from V3.1.0, so this is the Dockerfile + executor wiring half.
My plan:
I'll split this into two focused PRs for cleaner review:
PR 1 — Java support:
sandbox/Dockerfile: installopenjdk-21-jdk-headlesssandbox/executor_server.py: add"java"toSUPPORTED_LANGUAGES,normalize_language(),/languagescheck,/executegate,_syntax_check_impl(javac), newexecute_java()(javac → java -cp),LANGUAGE_HANDLERSregistrationv3-service/main.py: add"java"toverified_languages+.javato_ext_to_langdocs/TROUBLESHOOTING.md+docs/ARCHITECTURE.md: update supported language liststests/infrastructure/test_sandbox_java_kotlin.py: Java execution + syntax check + error handling tests
PR 2 — Kotlin support (follow-up):
- Same pattern, using
kotlinc -include-runtime -d program.jar→java -jarfor the compile/run step - Kotlin compiler installed from official GitHub release ZIP
"kotlin"/"kt"aliases
Both PRs follow the existing
execute_go/execute_rustcompile-then-run pattern exactly.Happy to start on PR 1 right away if this approach works!
@Anuj-72 Approved - the two-PR split works, and your file list is right. Three tips before you start:
- javac needs the file named after its public class (the other handlers use fixed filenames) - have
execute_java()extract the class name, falling back toMain. - CI boots the executor on the host runner, which has no JDK - gate your tests with
skipif(shutil.which("javac") is None), and includedocker compose exec sandboxtest output in the PR description. - Use
--no-install-recommendsfor the JDK, and pin the Kotlin ZIP by version + SHA-256 (everything fetched at build time here is checksum-pinned).
Base both PRs on a fresh pull of
dev. Assigning you now!Reacted by Anuj Kumar Sah- javac needs the file named after its public class (the other handlers use fixed filenames) - have
- added a commit that references this issue
on Jul 10, 2026 - added 2 commits that reference this issue
on Jul 12, 2026 - added a commit that references this issue
on Jul 15, 2026
Description
The sandbox currently supports Python, JavaScript, TypeScript, Go, Rust, C, C++, and Bash. Java and Kotlin are widely used and would broaden ATLAS's usefulness for more developers.
Requirements
javac+java)kotlinc+kotlinorkotlincto JAR)sandbox/executor_server.pyjava,kt,kotlin)docs/TROUBLESHOOTING.mdsupported languages listContext
The sandbox architecture is straightforward — each language needs a compile step and a run step. See existing implementations in
sandbox/executor_server.pyfor the pattern.