FAQ
Is my code uploaded?
Yes. Code is not compiled locally: it is sent to our own execution gateway at run.dsjson.com, and only falls back to the Wandbox third-party service when that gateway is unavailable. Never run code containing passwords, keys or internal data here.
Which JDK version is used?
JDK 21, so code using recent language features works.
Any constraints on the class name?
If you declare a public class its name must match the file name. Simplest is to omit public or use Main consistently.
About this tool
Compilation and execution are remote: our own gateway at run.dsjson.com first, with Wandbox as the fallback. The code leaves your browser — do not put anything sensitive in it.
The environment is OpenJDK 21 and the file name is fixed as Main.java. That dictates the most common trap: the public class must be called Main (public class Main); writing public class Hello fails to compile, because a public class must match its file name — a rule of the Java language, not a limitation of this tool. Helper classes may be named freely as long as they are not public.
The standard input box is passed as stdin, so Scanner and BufferedReader both work. Compile errors and runtime exceptions are shown separately, and stack traces are printed verbatim — follow the Caused by lines down to find the real cause.
The samples cover Hello, arithmetic, loops, classes and objects, and standard input; picking one loads and runs it, which is a faster way to confirm the environment and language level than reading docs.