Policy-based Java sandbox with instrumentation support, optimized for online judges.
Java class sandbox with instrumentation support for online judges.
It implements:
System.out
stream that’s suitable for single-threaded online-judging scenariosTo run a class Submission
with agent the following suffices:
$ java -client -javaagent:/code/java-sandbox-agent.jar=[option, ...] Submission
Supported fields for the option
list are:
nobigmath
— disables BigInteger
and BigDecimal
, raising appropriate exceptions if they are usedunicode
— encodes System.out
as UTF-8 instead of ASCII, sacrificing performance for Unicode supportnobuf
— sets System.out
as being line-buffered, for interactive problemsunsafe
— enables sun.misc.Unsafe
, which is disabled by default