Online java compilers

PROGRAMMATIC INTERFACE

javac supports the new Java Compiler API defined by the classes and interfaces in the package.

Example

To perform a compilation using arguments as you would give on the command line, you can use the following:

JavaCompiler javac = ToolProvider.getSystemJavaCompiler();
int rc = javac.run(null, null, null, args);

This will write any diagnostics to the standard output stream, and return the exit code that javac would give when invoked from the command line.

You can use other methods on the interface to handle diagnostics, control where files are read from and written to, and so on.

Old Interface

Note: This API is retained for backwards compatibility only; all new code should use the Java Compiler API, described above.

The class provides two static methods to invoke the compiler from a program:

public static int compile(String[] args);
public static int compile(String[] args, PrintWriter out);

The parameter represents any of the command line arguments that would normally be passed to the javac program and are outlined in the above section.

The parameter indicates where the compiler’s diagnostic output is directed.

The return value is equivalent to the exit value from javac.

Note that all other classes and methods found in a package whose name starts with (informally known as sub-packages of ) are strictly internal and subject to change at any time.

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 10 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.

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 allows having only one file. So it isn’t the best choice for multiple package projects or learning programming concepts like encapsulation and inheritance.

EXAMPLES

Compiling a Simple Program

The following source file, , defines a class called greetings.Hello:

package greetings;

public class Hello {
    public static void main(String[] args) {
        for (int i=0; i < args.length; i++) {
            System.out.println("Hello " + args);
        }
    }
}

The directory is the package directory both for the source file and the class file and is off the current directory. This allows us to use the default user class path. It also makes it unnecessary to specify a separate destination directory with -d.

C:\>javac greetings\Hello.java
C:\>dir greetings /B
Hello.class
Hello.java
C:\>java greetings.Hello World Universe Everyone
Hello World
Hello Universe
Hello Everyone

Compiling Multiple Source Files

This example compiles all the source files in the package .

C:\>dir /B
greetings
C:\>dir greetings /B
Aloha.java
GutenTag.java
Hello.java
Hi.java
C:\>javac greetings\*.java
C:\>dir greetings /B
Aloha.class                        
Aloha.java                           
GutenTag.class
GutenTag.java
Hello.class
Hello.java
Hi.class
Hi.java

Specifying a User Class Path

Having changed one of the source files in the previous example, we recompile it:

C:\>cd
\examples
C:\>javac greetings\Hi.java

Since refers to other classes in the package, the compiler needs to find these other classes. The example above works, because our default user class path happens to be the directory containing the package directory. But suppose we want to recompile this file and not worry about which directory we’re in? Then we need to add to the user class path. We can do this by setting CLASSPATH, but here we’ll use the -classpath option.

C:\>javac -classpath \examples \examples\greetings\Hi.java

If we change again, to use a banner utility, that utility also needs to be accessible through the user class path.

C:\>javac -classpath \examples;\lib\Banners.jar ^
            \examples\greetings\Hi.java

To execute a class in , we need access both to and to the classes it uses.

C:\>java -classpath \examples;\lib\Banners.jar greetings.Hi

Separating Source Files and Class Files

It often makes sense to keep source files and class files in separate directories, especially on large projects. We use -d to indicate the separate class file destination. Since the source files are not in the user class path, we use -sourcepath to help the compiler find them.

C:\>dir /B
classes
lib
src
C:\>dir src
farewells
C:\>dir src\farewells
Base.java
GoodBye.java
C:\>dir lib
Banners.jar
C:\>dir classes
C:\>javac -sourcepath src -classpath classes;lib\Banners.jar ^
            src\farewells\GoodBye.java -d classes
C:\>dir classes
farewells
C:\>dir classes\farewells
Base.class
GoodBye.class

Note: The compiler compiled , even though we didn’t specify it on the command line. To trace automatic compiles, use the -verbose option.

Cross-Compilation Example

The following example uses javac to compile code that will run on a 1.6 VM.

C\:>javac -source 1.6 -target 1.6 -bootclasspath C:\jdk1.6.0\lib\rt.jar ^
            -extdirs "" OldCode.java

The option specifies that version 1.6 (or 6) of the Java programming language be used to compile . The option -target 1.6 option ensures that the generated class files will be compatible with 1.6 VMs. Note that in most cases, the value of the -target option is the value of the -source option; in this example, you can omit the -target option.

You must specify the -bootclasspath option to specify the correct version of the bootstrap classes (the library). If not, the compiler generates a warning:

C:\>javac -source 1.6 OldCode.java
warning:  bootstrap class path not set in conjunction with -source 1.6

If you do not specify the correct version of bootstrap classes, the compiler will use the old language rules (in this example, it will use version 1.6 of the Java programming language) combined with the new bootstrap classes, which can result in class files that do not work on the older platform (in this case, Java SE 6) because reference to non-existent methods can get included.

SEARCHING FOR TYPES

When compiling a source file, the compiler often needs information about a type whose definition did not appear in the source files given on the command line. The compiler needs type information for every class or interface used, extended, or implemented in the source file. This includes classes and interfaces not explicitly mentioned in the source file but which provide information through inheritance.

For example, when you subclass java.applet.Applet, you are also using Applet’s ancestor classes: java.awt.Panel, java.awt.Container, java.awt.Component, and java.lang.Object.

When the compiler needs type information, it looks for a source file or class file which defines the type. The compiler searches for class files first in the bootstrap and extension classes, then in the user class path (which by default is the current directory). The user class path is defined by setting the CLASSPATH environment variable or by using the -classpath command line option. (For details, see Setting the Class Path).

If you set the option, the compiler searches the indicated path for source files; otherwise the compiler searches the user class path for both class files and source files.

You can specify different bootstrap or extension classes with the -bootclasspath and -extdirs options; see below.

A successful type search may produce a class file, a source file, or both. If both are found, you can use the option to instruct the compiler which to use. If newer is given, the compiler will use the newer of the two files. If source is given, it will use the source file. The default is newer.

If a type search finds a source file for a required type, either by itself, or as a result of the setting for -Xprefer, the compiler will read the source file to get the information it needs. In addition, it will by default compile the source file as well. You can use the option to specify the behavior. If none is given, no class files will be generated for the source file. If class is given, class files will be generated for the source file.

The compiler may not discover the need for some type information until after annotation processing is complete. If the type information is found in a source file and no -implicit option is given, the compiler will give a warning that the file is being compiled without being subject to annotation processing. To disable the warning, either specify the file on the command line (so that it will be subject to annotation processing) or use the -implicit option to specify whether or not class files should be generated for such source files.

Introduction To Java IDE

Java is one of the popular and powerful programming languages as well as a platform. It is a high level and secured programming language that is used across several platforms in the world like Web applications, Android, Big Data, Banking Domain, Information Technology, Financial Services, etc.

To implement Java programming language we need certain environments where the user can develop codes and applications. Here comes the role of Java Integrated Development Environment (Java IDE). The need for Java IDE was felt as developers were facing issues while coding a huge application.

Huge applications will have a lot of classes & files, and thus, it gets difficult to debug them. With IDE, proper project management can be maintained. It provides hints on code completion, syntax errors, etc.

The Integrated Development Environment (IDE) is a software application that provides developers a platform with many features & facilities to develop Computer applications, Web pages, Tools, Services, etc.

The IDE tool will include text editors, debuggers, compilers, some features, and tools that will help in automation, testing and analyzing of an application development flow.

In simple terms, IDE allows developers to convert their logical code into some useful software applications.

Working Principle Of IDE

IDE follows a simple working principle that allows the developers to write logical code in its environment editor. Its compiler feature tells where all the errors are. The debug feature helps to debug the complete code and rectify errors.

Lastly, it helps in automating some parts and also assists to build a whole new software application. It is capable of supporting Model-Driven Development as well.

Core Functions Of IDE

  • IDE should possess code completion capability for identifying the Java language functions and keyword.
  • It should have strong resource management that helps to identify missing resources, headers, libraries, etc.
  • A good debugging tool to test the developed application completely.
  • Compile and build features.

Advantages:

  • IDE takes very minimal time and effort as the entire concept of IDE is to make development easier and faster.
  • It follows certain company standards, hence the working principle will be the same throughout and helps the coders.
  • It comes with good project management tools and documents to automate many things.
  • Useful in simplifying the development of database applications.
  • It has features to develop a good user interface with text boxes, buttons, etc.

Disadvantages:

  • IDE comes with a complex learning curve, thus having some expertise on these tolls will not be easy.
  • It is not capable to remove bad code, design, and errors on its own. So the developer needs to be very careful while coding.
  • It requires more memory as it uses the graphical user interface.
  • It also has a restriction to interact with the database directly.

How To Select A Java IDE

Deciding which IDE or editor suits our needs depends on various factors including the nature of the projects or applications being developed, the process used by the development team, individual-level and skills as a programmer as well as the role in the organization.

Personal preferences and standardization of tools also play an important part in the selection of IDE or editor.

The major advantage of using an IDE for development is when a compiler is integrated with IDE, we get the entire package at one place so that we can complete the code, compile, debug, and execute the program in the same software.

IDEs have an attractive user interface and come packaged with all the elements of software development that we can use to develop software applications.

In this tutorial, we will discuss some of the IDE used for Java development along with the Compilers/IDEs that we can use for Java programming. For developing server-side Java applications, we use three IDEs often i.e. IntelliJ IDEA, Eclipse, and NetBeans.

We will review these three IDEs along with a few other popular ones.

Модуляризация библиотек

Для модуляризации библиотеки нельзя сделать ничего лучше, чем использовать — инструмент для статистического анализа, который является частью Java SE.

Например, команда, которая позволяет увидеть зависимости нашей небольшой библиотеки, выглядит так:

А вот результат её выполнения:

Как и ожидалось, библиотека зависит только от модуля.

Мы знаем, что зависит от модуля . Давайте попробуем использовать , чтобы он подтвердил нам это. Для этого нужно удалить файлы и и затем запустить :

Результат:

Команда:

Результат:

Хорошо, но можно лучше. Мы можем попросить автоматически сгенерировать модульный дескриптор для набора jar-файлов. Просто укажите ему, куда сохранять сгенерированные файлы (например, в папку ), и где находятся jar-файлы:

Команда создаст два файла: и со следующим содержимым:

Теперь мы можем добавить сгенерированный дескриптор для нашей библиотеки в её исходный код, переупаковать её, и у нас получится полностью модульное приложение:

Теперь у нас есть полностью модуляризированные библиотека и приложение. После удаления сгенерированных и бинарных файлов, структура нашего приложения выглядит следующим образом:

Обратите внимание, что для получения хороших данных от  вы должны предоставить местоположение всех jar-файлов, которые используются в приложении, чтобы он мог составить полный граф модуля. Наиболее простым способом получить список всех jar-файлов, которые используются в библиотеке, является использование скрипта Gradle

Он выведет пути локальных jar-файлов для всех зависимостей библиотек, которые вы добавите в секцию зависимостей, и скачает их, если необходимо:

Наиболее простым способом получить список всех jar-файлов, которые используются в библиотеке, является использование скрипта Gradle. Он выведет пути локальных jar-файлов для всех зависимостей библиотек, которые вы добавите в секцию зависимостей, и скачает их, если необходимо:

Если у вас нет Gradle, вы можете использовать SdkMAN! для его установки:

Для получения списка зависимостей используйте следующую команду:

Полученную информацию передайте для анализа и автоматической генерации метаданных.

Это файл, который выводит для :

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:

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.

Conclusion

In this tutorial, we explored the various IDEs/compilers and online compilers that we can use for Java programming.

We walked through the detailed information about IDE – features, pros, and cons, where it was developed, it’s pricing, how it looks, languages and platform supported, etc. Now we know how important the IDE is for developers and how it can make the development easier.

IDE gives the developer a platform to polish their coding skills with code completion, code suggestion, and error highlighting features. It increases efficiency with faster coding and minimal efforts. It allows collaboration among developers to work together on a single platform. Good project management feature.

IntelliJ IDEA, Eclipse, and NetBeans are the top three IDEs that are used extensively for Java programming today. Similarly, we can use the top 5 online compilers that we discussed for not so advanced Java programming.

Small Scale and Learning Universities: BlueJ, JGrasp, Greenfoot, DrJava are some of the Java IDE that is best for this small scale due to its cost and community support.

Medium and Large Scale Industries: Eclipse, IntelliJ Idea, NetBeans, JDeveloper are good for large scale due to their advanced features and performance.

In our subsequent tutorials, we will learn Eclipse Java IDE in detail as this is the most widely used and popular IDE among Java programmers.

=>> Contact us to suggest a listing here.

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:

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.

Типичные ошибки компиляции и запуска Java программ

Команда javac не найдена

Если при запуске javac, т.е. при попытке компиляции Java программы вы получаете ошибку:

"javac" не является внутренней или внешней
командой, исполняемой программой или пакетным файлом.

Это означает, что JDK не установлен. Либо установлен, но не настроены переменные окружения. Способы исправления очевидны:

  • установить JDK
  • настроить переменные окружения

Если JDK установлен, то можно обойтись без добавления переменной окружения. Для этого используйте абсолютный путь до исполнимого файла javac:

C:\Program Files\Java\jdk1.8.0_131\bin\javac.exe программа_для_компиляции.java

Ошибка Class names are only accepted if annotation processing is explicitly requested

Если попытаться скомпилировать программу следующим образом:

"C:\Program Files\Java\jdk1.8.0_131\bin\javac.exe" Welcome2

то возникнет ошибка:

error: Class names, 'Welcome', are only accepted if annotation processing is explicitly requested
1 error

Причина ошибки в том – что вы забыли указать расширение файла .java.

Ошибка записи (error while writing)

Запуск компиляции:

C:\Users\Alex>"C:\Program Files\Java\jdk1.8.0_131\bin\javac.exe" C:\Welcome.java

Компиляция заканчивается ошибкой:

C:\Welcome.java:1: error: error while writing Welcome: C:\Welcome.class (╬Єърчрэю т фюёЄєях)
public class Welcome {
       ^
1 error

Причина ошибки в том, что у компилятора (javac) недостаточно прав на запись в тот каталог, куда он пытается сохранить новый файл .class. Чтобы ошибка исчезла: предоставьте компилятору дополнительные права (запустите от имени администратора), либо сохраняйте в папку, на которую у текущего пользователя имеются права записи.

Ошибка «class is public, should be declared in a file named»

Запуск компиляции

"C:\Program Files\Java\jdk1.8.0_131\bin\javac.exe" C:\Welcome.java

который заканчивается примерной такой ошибкой

C:\Welcome.java:1: error: class Welcomee is public, should be declared in a file named Welcomee.java
public class Welcomee {
       ^
1 error

означает, что вы неправильно назвали класс в исходном коде программы. Имя класса должно совпадать с именем файла. В данном случае файл называется Welcome.java, а класс внутри программы назван Welcomee

Error: Could not find or load main class

Если попытаться запустить программу следующим образом:

java Welcome.class

то возникнет ошибка

Error: Could not find or load main class Welcome.class

Причина её в том, что не нужно было добавлять к названию файла расширение .class. Виртуальная машина автоматически добавляет расширение и в приведённом примере она ищет файл Welcome.class.class

Ошибка Error: Could not find or load main class при запуске Java программы по абсолютному пути

Эта ошибка возможно при запуске Java программы по абсолютному пути:

java C:\Welcome

Будет выведено:

Error: Could not find or load main class C:\Welcome

Ошибка возникает как в Windows, так и в Linux:

java /home/mial/Welcome
Error: Could not find or load main class .home.mial.Welcome

Если в терминале вы находитесь в той же директории, что и файл, который вы запускаете, то не нужно указывать абсолютный путь. Например, нужно запускать так:

cd C:\
java Welcome

Если же вы находитесь в другой директории, то нужно использовать опцию -cp, после которой указать путь до каталога, где размещена запускаемая программа. А далее указать запускаемый файл без расширения .class:

java -cp C:\ Welcome

Как видно из скриншота, командная строка находится в папке C:\WINDOWS\system32. Файл, который нам нужно запустить, находится в папке C:\ (корень диска). Мы указываем после ключа -cp папку C:\, а затем пишем имя файла программы без расширения – Welcome.

Аналогично нужно поступать в Linux. Пример команды:

java -cp /home/mial/ Welcome

Ошибка Main method not found in class

Если при запуске вы столкнулись с ошибкой:

Error: Main method not found in class Welcome, please define the main method as:
   public static void main(String[] args)
or a JavaFX application class must extend javafx.application.Application

Это означает, что вы не указали метод main, либо написали слово неправильно (например, Main вместо main).

Setup

First, we need to add JDK’s tools.jar as a dependency for our project:

Every compiler extension is a class which implements com.sun.source.util.Plugin interface. Let’s create it in our example:

Let’s create it in our example:

For now, we’re just printing “Hello” to ensure that our code is successfully picked up and included in the compilation.

Our end goal will be to create a plugin that adds runtime checks for every numeric argument marked with a given annotation, and throw an exception if the argument doesn’t match a condition.

There’s one more necessary step to make the extension discoverable by Javac: it should be exposed through the ServiceLoader framework.

To achieve this, we need to create a file named com.sun.source.util.Plugin with content which is our plugin’s fully qualified class name (com.baeldung.javac.SampleJavacPlugin) and place it in the META-INF/services directory.

After that, we can call Javac with the -Xplugin:MyPlugin switch:

Note that we must always use a String returned from the plugin’s getName() method as a -Xplugin option value.

Extract AST Data

We can get an AST generated by the Java compiler through the TaskEvent.getCompilationUnit(). Its details can be examined through the TreeVisitor interface.

Note that only a Tree element, for which the accept() method is called, dispatches events to the given visitor.

For example, when we execute ClassTree.accept(visitor), only visitClass() is triggered; we can’t expect that, say, visitMethod() is also activated for every method in the given class.

We can use TreeScanner to overcome the problem:

In this example, it’s necessary to call super.visitXxx(node, value) to recursively process the current node’s children.

Modify AST

To showcase how we can modify the AST, we’ll insert runtime checks for all numeric arguments marked with a @Positive annotation.

This is a simple annotation that can be applied to method parameters:

Here’s an example of using the annotation:

In the end, we want the bytecode to look as if it’s compiled from a source like this:

What this means is that we want an IllegalArgumentException to be thrown for every argument marked with @Positive which is equal or less than 0.

5.1. Where to Instrument

Let’s find out how we can locate target places where the instrumentation should be applied:

For simplicity, we’ve only added primitive numeric types here.

Next, let’s define a shouldInstrument() method that checks if the parameter has a type in the TARGET_TYPES set as well as the @Positive annotation:

Then we’ll continue the finished() method in our SampleJavacPlugin class with applying a check to all parameters that fulfill our conditions:

In this example, we’ve reversed the parameters list because there’s a possible case that more than one argument is marked by @Positive. As every check is added as the very first method instruction, we process them RTL to ensure the correct order.

5.2. How to Instrument

The problem is that “read AST” lays in the public API area, while “modify AST” operations like “add null-checks” are a private API.

To address this, we’ll create new AST elements through a TreeMaker instance.

First, we need to obtain a Context instance:

Then, we can obtain the TreeMarker object through the TreeMarker.instance(Context) method.

Now we can build new AST elements, e.g., an if expression can be constructed by a call to TreeMaker.If():

Please note that we want to show the correct stack trace line when an exception is thrown from our check. That’s why we adjust the AST factory position before creating new elements through it with factory.at(((JCTree) parameter).pos).

The createIfCondition() method builds the “parameterId < 0″ if condition:

Next, the createIfBlock() method builds a block that returns an IllegalArgumentException:

Now that we’re able to build new AST elements, we need to insert them into the AST prepared by the parser. We can achieve this by casting public API elements to private API types:

Модуляризация проекта

Пока что ничего нового, но давайте начнем модуляризацию нашего проекта. Для этого создадим модульный дескриптор (всегда называется и размещается в корневой директории ):

Команда для компиляции модуля в Java 9 отличается от того, что мы видели раньше. Использование старой команды с добавлением модуля к списку файлов приводит к ошибке:

Чтобы понять, почему наш код не компилируется, необходимо понять, что такое безымянные модули.

Любой класс, который загружается не из именованного модуля, автоматически выполняет часть безымянного модуля. В примере выше перед созданием модульного дескриптора наш код не был частью какого-либо модуля, следовательно, он был ассоциирован с безымянным модулем. Безымянный модуль — это механизм совместимости. Проще говоря, это позволяет разработчику использовать в приложениях Java 9 код, который не был модуляризирован. По этой причине код, относящийся к безымянному модулю, имеет правила сродни Java 8 и ранее: он может видеть все пакеты, экспортируемые из других модулей, и все пакеты безымянного модуля.

Когда модульный дескриптор добавляется к модулю, его код больше не является частью безымянного модуля и не может видеть код других модулей, пока не импортирует их. В случае выше модуль не требует никаких модулей, поэтому модуль библиотеки Greeting для него не виден. Он может видеть только пакеты модуля .

Модули в Java 9, за исключением неуловимого безымянного модуля описанного выше, должны объявлять, какие другие модули им необходимы. В случае с модулем  единственным требованием является библиотека Greeting. Но, как вы могли догадаться, эта библиотека (как и другие библиотеки, не поддерживающие Java 9) не является модулем Java 9. Как же нам включить её в проект?

В таком случае вам нужно знать имя jar-файла. Если у вас есть зависимость от библиотеки, которая не была конвертирована в модуль Java 9, вам надо знать, какой jar-файл вызывается для этой библиотеки, потому что Java 9 переведёт имя файла в валидный модуль.

Это называется автоматический модуль.

Так же, как и безымянные модули, автоматические модули могут читать из других модулей, и все их пакеты являются экспортируемыми. Но, в отличие от безымянных модулей, на автоматические можно ссылаться из явных модулей.

Чтобы узнать имя автоматического модуля, компилятор конвертирует неальфанумерические, поэтому что-то вроде превратится в имя модуля .

У нас есть библиотека с именем . Давайте переименуем jar-файл в :

Это более стандартное имя файла, и теперь мы можем сказать Java включить автоматический модуль с приемлемым именем . И можем вызывать его из модуля:

Модули не добавлены в . Как и обычные jar-файлы, они используют новый флаг . Теперь мы можем скомпилировать наши модули следующей командой:

Чтобы запустить командой мы можем использовать новый флаг , который принимает либо имя модуля, либо шаблон :

И мы получим вывод .

Для создания и использования в качестве исполняемого jar-файла выполните следующие команды:

Следующим шагом будет модуляризация библиотек, которые используются нашим приложением.

Online Java Compilers

#1) OnlinedGdb

Price: FreePlatform Support: Windows

Online compiler and debugger tool for various languages including C/C++, Java, etc. It has an embedded gdb debugger.

Features:

  • Supports various languages including C/C++, Java, Python, C#, VB, etc.
  • First online IDE that gives debugging facility with embedded gdb debugger.
  • Allows specifying command-line arguments.

Website: OnlinedGdb

#2) Jdoodle

Price: FreePlatform Support: Windows

Jdoodle is an online compiler developed with the aim of helping students to learn programming language. It is an online tool to compile and execute programs in Java, C/C++, PHP, Perl, Python, Ruby, HTML and many more.

Features:

  • It provides a quick and easy way to compile and execute a few lines of code online.
  • It provides a feature to save and share programs.
  • Supports almost all the Java libraries.

Website: Jdoodle

#3) Codechef

Price: FreePlatform Support: Windows

This online IDE support multiple languages such as Java, C, C++, Python, and Ruby, etc. Suitable for various levels of programming and also contains a lot of tutorials using which a programmer can improve his/her skills.

Features:

  • Supports multiple languages.
  • Includes various difficulty levels for programming practice like a beginner, medium, hard, etc.
  • Can open already existing programs in this editor.
  • Has solid community support for programmers.

Website: Codechef

#4) Repl

Price: FreePlatform Support: Windows

A typical Repl online IDE will look as shown below:

Repl is the Powerful and simple online compiler, IDE, and interpreter that is capable of developing programs in 50+ languages including Java, Python, C, C++, JavaScript, etc.

Features:

  • Interactive and Open-source IDE.
  • IDE is cloud-based.
  • Has powerful tools to learn and teach programming languages.
  • We can share the code.

Website: Repl

#5) CompileJava

Price: FreePlatform Support: Windows

This is a fast and functional online Java compiler that always has the latest version of Java.

Features:

  • Multiple themes that ensure ease of coding.
  • Support for Optional command-line arguments.
  • Multiple public classes are split automatically to files.
  • Provides Applet support, including JPanel.
  • The submissions made by the programmer are deleted within 5 minutes of execution (to accommodate applets) and are not stored for any other purpose.

Website: CompileJava

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

Adblock
detector