Codiva.io is our top pick for online Java compiler. It is new to this game, but it has some cool features.
The single biggest feature of Codiva is, it compiles as you type, parses the compilation errors and shows it in editor. By the time, you complete typing, you get the compilation results.
It also has a pretty good autocompletion. These two features will save you a lot of time when coding.
Codiva supports multiple files and packages, and can have custom file names. You can also run interactive programs. So most of the topics for beginners learning Java and Algorithms course can be completed with Codiva itself.
Codiva is also the only IDE that works reasonably well on mobile.
Some disadvantages of Codiva are, it supports only Java, C and C++, doesn’t offer UI themes, or different compiler settings. Codiva supports Java 9, but doesn’t support Java 9 Modules. Of course no other online compilers support Java 9 modules either.
JDoodle is a popular online compiler for Java. It started for Java, but now supports almost 70 languages. JDoodle allows only a single file but you don’t have to specify any filename. It finds it by parsing the file contents.
JDoodle has excellent terminal support for running interactive programs. By default, the programs are run in non-interactive mode with 10s limit. But you can switch to interactive mode if required for each project.
If you are a kind of a person who learns a lot of programming languages, or switches between multiple languages often, JDoodle would be a great choice.
For Java, the major disadvantage for JDoodle compared to Codiva is, you have to manually click compile every time you finish the code. Then read through the error messages, find the line number, and go back to the editor. You will find it annoying if you have used a desktop IDE or coded with Codiva before.
The second disadvantage is, it only supports one file. If you are using it for programming course, then the concept of packages, encapsulation, etc cannot be taught.
Despite these drawbacks, JDoodle is a great site. It is popular for a reason.
Rextester started as a Regular Expression Tester, later grew to be an online IDE. It supports around 30 languages including Java, but it is more popular among C# users.
Rextester allows switching between multiple editor widgets to suit your preference.
It has one of the best live collaboration support. Just share the URL, start typing. Multiple users can edit at the same time, and so far, I haven’t seen a glitch.
Rextester supports only a single file, and the class should be named Rextester. Also, the class should NOT be made public. At the time of writing this, it supports only Java 8.
Online GDB is the online tool that supports a built-in debugger. If you write some complex program, and have to debug in case of an error, the debugger will come in handy.
You can set a breakpoint, and when running the code, it will stop at that line, and progress through the code step by step, and see the intermediate variable values.
It also has a built-in code-formatter, that formats the code automatically to a decently formatted code, but you cannot define your preferred code style though.
It supports only Java 8. The compilation is a bit slow, but it is still worth trying.
Browxy used to be popular but started to lag behind. It supports multiple files. At present only Java 8.
Browxy is the only online compiler that has almost no restrictions. You can even send network requests to external URLs.
This will be super useful if you want to practice calling API calls. It also supports Applets, but no one uses Applets anyway.
Browxy compiles and runs fast, we get the response within a fraction of a second.
Ideone is one of the first online compilers that are still around. So it deserves an honorable mention.
It supports around 60+ languages. Ideone hasn’t been updated to support Java 9. IDEOne provides an API for compilation as a service, that you can use to build your own online IDE to be used on your website.
Updated: Sunday, September 8, 2019 1:39 PM