Online Java Compiler

Write Java in the browser and run it on our machines. The editor is opening.

Free online Java IDE

JDoodle is an online IDE that has served the programming community since 2013. You write, compile, and run code in the browser for Java and many other languages, without installing a toolchain.

What you see on this page is JDoodle’s free Java compiler. Write Java in the editor, press Execute, and JDoodle compiles the program with javac and runs it on a remote JDK. You do not install a JDK, and you do not need a JDoodle account to run code. This compiler is not a JavaScript simulator: Scanner, System.out.println, and the rest of the Java standard library behave the way they do on your own machine.

Online Java IDE

JDoodle’s Java editor on this page highlights syntax, completes as you type, matches brackets, and folds blocks. It is an online Java editor and a compiler together: you write here, then Execute runs javac on a remote JDK.

Java versions on JDoodle

JDoodle currently ships these Java builds. Choose one from the version menu before you execute. The installed releases are JDK 8 (1.8.0_66), JDK 9 (9.0.1), JDK 10 (10.0.1), JDK 11 (11.0.4), JDK 17 (17.0.1), JDK 21 (21.0.0), and JDK 25 (25.0.2).

JDoodle version Installed release
JDK 81.8.0_66
JDK 99.0.1
JDK 1010.0.1
JDK 1111.0.4
JDK 1717.0.1
JDK 2121.0.0
JDK 2525.0.2

Use JDK 21 or JDK 17 on JDoodle for current LTS work. Use JDK 25 to try the newest language features. Use JDK 8 only when you are matching an older course or codebase.

Maven libraries

JDoodle can pull public Maven artifacts into a Java run. Add them in the library field as group:artifact:version, for example org.apache.commons:commons-lang3:3.4. Look up coordinates on search.maven.org. Private and local JARs are not available on this JDoodle page.

Debugging Java online

JDoodle debugs Java in the browser, so you do not have to read a program and guess what it did. Set a breakpoint by clicking a line number, press Debug, and execution stops there. From that point you can step over a line, step into a call, step back out, or let it run on to the next breakpoint, and the call stack beside the editor shows how you arrived. Every local variable in the frame you are looking at is listed with its current value, and objects and arrays open up so you can look inside them. A debug session is interactive, so a program that reads input still reads it from you while it is paused.

Debugging runs on JDK 25.0.2, the newest Java build here and the one this page opens with. Older versions still compile and run as they always did, and the Debugger tab says so if you switch to one.

Debugging is free to use. Sessions last three minutes on the free plan and ten minutes on Pro and Teacher plans, and you can start as many as you need.

Frequently asked questions

Is JDoodle’s online Java IDE free?

Yes. JDoodle lets you write and run Java without paying. A JDoodle account is only needed to save projects, use more AI credits, or unlock faster workspaces.

Do I need to install a JDK to use JDoodle?

No. JDoodle runs Java on its servers. Open this page in a browser and execute.

Which Java version should I pick on JDoodle?

Pick JDK 21 or JDK 17 for current LTS work. Pick JDK 25 to try new language features. Pick JDK 8 only if a course or an older codebase requires it.

Can I add Maven libraries on JDoodle?

Yes, if the artifact is on the public Maven repository. Private or local JARs are not supported on this JDoodle page.

Is this the single-file Java compiler?

No. This page is JDoodle’s multi-file Java IDE. The single-file compiler is the online Java compiler.

Is this an online Java editor or a compiler?

Both. The page is an online Java editor and it compiles and runs what you write. Nothing is simulated: your code is built with javac and executed on a real JDK.

Can I debug Java code online?

Yes. JDoodle has a step debugger for Java. Click a line number to set a breakpoint, press Debug, and the program stops there so you can step over, step into, and read the call stack. Local variables are listed with their values while you are paused, and you can open objects and arrays to look inside. Debugging runs on JDK 25.0.2, the newest build here and the one this page opens with. Debugging is free, and a session runs for three minutes on the free plan or ten on a paid one.

Can I see a Java GUI window online?

Yes. A Java program that opens a window shows it here in the GUI tab, live, next to your Output. Tick GUI in the I/O row before you run, and the window appears as soon as your program draws one - you can click and type into it as you would on your own machine. The GUI window runs on JDK 25.0.2, the newest build here and the one this page opens with. A window stays open for five minutes on the free plan or fifteen on a paid one, and every click or keystroke extends it.

Is this an online Java GDB?

Not literally, and the difference is worth a sentence. GDB is the GNU Debugger, and it works on programs compiled to native machine code: C, C++, Objective-C, Fortran and the like. Java does not compile to that, so GDB cannot step through it. What people mean by an online Java GDB is an online debugger for Java, and this page has one. Click a line number to set a breakpoint, press Debug, and the program stops there so you can step over, step into, read your local variables and follow the call stack. If you wanted the C one, that is the online C compiler and the online C++ compiler, both of which debug too.

Input, interactive runs, files, and the rest of the editor work the same on every language. See the JDoodle IDE documentation.

More online IDEs like Java

React, Vue, C#, Python3, C++, C++ 14

This website uses cookies to ensure you get the best experience on our website.