Course – LS – All

Get started with Spring and Spring Boot, through the Learn Spring course:

>> CHECK OUT THE COURSE

1. Introduction

An online compiler is a tool which allows us to compile the source code and execute it online. This is a great option, especially for new Java students, tutors, or interviewers. Additionally, it’s super easy to share the code or collaborate in private or group sessions.

Besides that, we don’t need to install a JDK or IDE.

In this article, we’ll be exploring the top Java online compilers out there.

2. JDoodle

JDoodle is an easy and quick way to compile and run source code in many programming languages including Java. Even more, JDoodle provides a terminal to work with MySql and MongoDB, peer programming tools, an API to execute code remotely, and an embedding feature for a blog or website.

Its UI has a user-friendly editor and input fields including:

  • Command line arguments
  • Interactive mode
  • JDK versions 8 to 17 are available
  • Attaching external libraries directly from the Maven repository. All we need is to specify the group, artifact ids and the version of the library.
ojc jdoodle

Additionally, we can open, save, and download the source file.

Furthermore, the tool displays the compilation and execution along with CPU time in seconds. The memory usage is shown in kilobytes.

Important to note, that JDoodle has one Basic IDE for simple single file programs and faster execution and another Advance IDE  for Multiple Files, Custom Library and File Read/Write.

3. Codiva

This online compiler is definitely on the top due to its unique features. To begin working in Codiva, we need to start a new project.

Its design is similar to common IDE interfaces. We have a project structure on the left, and the source file editor on the right. By default, the working directory is src > hello > com > example. We can easily add new java files by clicking the + sign next to the file name.

The source file immediately is added to the working tree:

ojc codiva
To get started, let’s click the Run button on the top right side. It compiles the code as we start typing. Furthermore, Codiva shows all the errors during the compilation and displays the program execution result as we finish typing.

Additionally, it offers syntax highlighting and autocomplete to save time.

Last but not least, we can embed the Java project into any blog or website. First, we need to press the Share button and make the project public. After, Codiva gives two options for sharing:

  • A public URL
  • HTML code to copy and paste into our website

As a disadvantage, this tool doesn’t support compiler settings and works only for Java, C, C++ languages.

4. Browxy

Browxy works relatively fast compared to other online compilers. The available languages are C, C++, C#, Java, Python, and PHP.

We can easily share the source file across the web. The GetUrl button generates a URL to the file which allows us to share the file. Even more, logged in users can publish their code publicly.

After hitting the Publish button, the project appears in the Published Code section:

ojc browxy

It has separate views for console, applet and logging outputs.

Another advantage is minimal restrictions for the running code. We can make external URL calls to test some APIs.

5. Rextester

Initially, Rextester was designed as a regular expression tester. Later, it grew into online IDE supporting a vast majority of programming languages.

It supports different editor and layouts views:

ojc rexter

It is also worth mentioning the live cooperation feature. After pushing the appropriate button, Rextester generates a shareable URL.

Anyone who has the URL can code in a permanent live session. We can see the changes that others make as well as be able to make our own.

6. OnlineGDB

OnlineGDB is a compiler and debugger for many coding languages including Java. Code formatting is also available to make coding more comfortable.

Even more, we can add breakpoints by simply clicking on the rows we want to observe. After pushing the Debug button, the debugging mode starts. It will pass step by step over the breakpoints set previously.

The user can watch the local variable values or the call stack in appropriate windows:

ojc onlinegdb

7. Compilejava

Compilejava is an easy online tool to run Java code. It has many themes including the midnight, which is displayed in the screenshot. Java beginners, students, can use it for educational purposes.

It always runs on the latest version of Java. We can import code snippets from the Gist by providing the URL:

ojc compileJava

8. Paiza.io

This online compiler has friendly and easy to use interface. Like other advanced compilers, Paiza has all the features like:

  • supporting multiple files
  • fast autocomplete
  • linking and sharing the code in GitHub or Gist
  • public or private sharing via the network
  • collaboration with the group of users
  • task scheduling
ojc paiza

It supports the majority of top programming languages including C, C++, C#, JVM languages and Python.

9. Remoteinterview

RemoteInterview is focused and designed to assist the online interviewing process in most of the common programming languages. It offers live pair programming, sharing code snippets, making video calls, recording and saving the interview.

The interviewer can invite anyone into a live session by sharing the invitation link:

ojc interview

10. Ideone

Ideone compiles and executes code in more than 60 programming languages. It allows code sharing as:

  • public – available to everyone
  • secret – available only to those with whom we share the URL
  • private – only available to the owner
ojc ideone

Ideone allows a time limit and memory usage constraints for the programs we submit:

  • 10 seconds compilation time
  • 5 seconds execution time (for not logged in users) and 15 seconds for logged in users
  • 256 MB for the memory usage

Finally, under the samples section, we can find the latest runs and executed code snippets. We can fork and try them on our own.

11. Repl.it

Repl.it has an interactive programming environment supporting many languages. Also, we can create a simple web project including HTML and JS files to practice basic web skills. Its very popular among teachers, interviewers, universities, and colleges.

First of all, we need to sign up on the platform. It is worth mentioning that this requirement doesn’t exist in any of the previously listed compilers:

ojc repl

One important feature is a built-in version control which allows to save the current work, work with the session later, or compare the changes with each version.

Additionally, it has a multi-functional terminal emulator, provides with the rich API and code sharing/collaboration tools, third-party library support.

12. Summary

In this guide, we’ve presented a quick summary of the many available Java online compilers.

Some of them are offering unique features like compiling while typing, code hints, autocomplete, built-in debugging or code formatting.

Despite that, modern online compilers are still limited in their capabilities when comparing to their desktop versions.

 

Course – LS – All

Get started with Spring and Spring Boot, through the Learn Spring course:

>> CHECK OUT THE COURSE
res – Microservices (eBook) (cat=Cloud/Spring Cloud)
Comments are open for 30 days after publishing a post. For any issues past this date, use the Contact form on the site.