Is the online Java compiler free?
Yes. Create a free account; there is no trial period and no credit card.
Write Java, press Run and read the output a moment later. Behind the button is javac on the JDK you choose — from Java 8 to Java 27 — plus completion, quick fixes and a debugger for when a one-liner turns into a project.
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.print("What is your name? ");
String name = in.nextLine();
System.out.println("Hello, " + name + "!");
}
} Press Shift+F10, type your name into the console and press Enter.
Built on the tools Java and Kotlin developers already trust
Compile and run Java online on JDK 8–27. A free browser IDE with completion, errors as you type, keyboard input, Maven, Gradle and a debugger. No install.
Code is compiled by the javac of an Eclipse Temurin or Azul Zulu JDK, not by a simulator. Every project picks its version, from 8 to 27.
The Eclipse JDT language server underlines compilation errors as you type. Alt+Enter offers fixes such as a missing import.
Programs that read System.in with Scanner or BufferedReader get what you type into the console.
When the build file has not changed, Run calls javac directly and starts the program without waiting for Maven or Gradle.
Add packages and classes, split the editor, switch to Maven or Gradle and pull libraries from Maven Central.
Projects stay in the cloud with Local History for every save and can be downloaded as a .zip archive.
When you press Run, the project is compiled with javac from the selected JDK and started with java in an isolated sandbox. Output streams into the Run tool window while the program prints, and the exit code and run time appear when it finishes.
Compilation errors stop the run and appear twice: underlined in the editor and listed in the Problems tool window with file and line. F2 jumps to the next one.
Every program lives in a project, so code is never lost in a pastebin. Create classes with Alt+Insert, find anything with Shift Shift and rename a method across every file with Shift+F6.
When you need a library, use a Maven or Gradle project, declare the dependency and it is downloaded on the next build together with its sources.
Programs run as console applications. They can read input and print output, but they cannot open network ports, show windows or reach the internet, and a run stops after ten minutes.
Yes. Create a free account; there is no trial period and no credit card.
The JDK you pick for the project, from Java 8 to Java 27. Project Structure (Ctrl+Alt+Shift+S) switches the JDK and the language level at any time.
Yes. All sources of the project are compiled together, in packages, the same way a desktop IDE does it.
Yes. Type into the Run console while the program is running and press Enter; the line arrives on System.in.
Open a tab and start coding
Free account, JDK 8–27, Maven, Gradle and Kotlin — nothing to install.
Create a free account