Quick Start — From Zero to Running Code
Java 17 is pre-selected. You will see a large code editor on the left, language controls at the top, and a “Result” output panel below.
Replace the starter code or add below it. The editor numbers lines automatically and highlights keywords in color. Your code is saved in the browser while you work — but not permanently. Copy anything you want to keep before closing the tab.
JDoodle sends your code to its server, compiles it, runs it, and returns output within a couple of seconds. Output appears in the “Result” panel. A red “Error” tab means compilation failed — the message inside shows you exactly which line caused the problem.
If your code uses Scanner sc = new Scanner(System.in), check the Interactive checkbox before clicking Execute. A text area appears where you type each input value — one per line — before the program runs.
Click Share / Embed in the toolbar. JDoodle generates a permanent URL that reloads your exact code. Paste it anywhere — email, chat, or a class submission.
Key Interface Areas
Defaults to Java. Use this to switch to Python, C, C++, or any of the 70+ supported languages. A second dropdown to the right selects the compiler version.
Numbered lines, syntax coloring, basic auto-indent. Paste directly or type. Has a full-screen expand button in the top-right corner of the editor when you need more space.
Enables a Stdin Inputs text area where you pre-fill keyboard values. Check this any time your program reads from a Scanner (Java) or calls input() (Python).
Compiles and runs your program on JDoodle’s server. The result appears below within a few seconds. Execution time limit on the free tier is 15 seconds — more than enough for any classroom snippet.
Shows program output on the Output tab. If compilation fails, the Error tab shows the compiler’s exact message with line numbers. Read the error tab — it always tells you where to look.
- Name your class
Main. JDoodle names your fileMain.javaby default. Usingpublic class Mainavoids a class-name mismatch error. - JDoodle runs real Java 17 — the same syntax rules that apply in VS Code apply here. Error messages are identical to what you would see locally.
- Two languages, two tabs. Open two JDoodle tabs to compare the same logic in Java and Python side by side — exactly what Cross Training is designed for.
- Need multiple class files? Use the + Add File button to create additional
.javafiles in the same project. - No account needed to run or share. Create an account only if you want to save projects permanently.
JDoodle defaults to Main.java. If your code says public class IterateAndDisplay, you get a compile error. Rename the class to Main, or use the file-rename option to match your class name.
If your code uses Scanner and Interactive is unchecked, the program receives empty input and will either crash or print unexpected output. Always check Interactive first.
JDoodle runs your code but cannot pause and step through it line by line. If you need to watch variables change as your program runs, switch to OnlineGDB or VS Code.
Perfect For … / Not the Right Tool When …
- Running a Cross Training Java snippet without starting VS Code
- Testing a small Java method, loop, or class quickly
- Comparing the same logic in Java vs. another language (open two tabs)
- Submitting a code snippet to a teacher via a shareable link
- Experimenting with a language you have never tried before
- Building a multi-file project with packages and imports (use VS Code)
- You need to step through code with a debugger — use OnlineGDB or VS Code
- Your program reads from or writes to files on disk
- You are writing production code — this is a scratchpad, not a workspace