Using Rell in Eclipse

Now that we have everything installed, we should try to make a simple hello world in Rell.

Hello World in Rell

  1. Switch to the Rell perspective, if not done already. Menu: Window - Perspective - Open Perspective - Other…, choose Rell.

  2. Create a project:

    • Menu File - New - Rell Project.
    • Enter a project name test and click Finish.

    A Rell project with a default directory structure shall be created.

  3. Create a Rell file:

    • Right-click on the src folder and choose New - File.
    • Enter a file name test.rell and click Finish.
  4. Write the code in the editor:

    function main() {
        print('Hello, World!');

    Save: manu File - Save or CTRL-S (⌘S).

  5. Run the program: right-click on the editor and choose Run As - Rell Console App.

  6. The output “Hello, World!” must be shown in the Console view.


IDE Overview

Eclipse IDE window consists of different views. Every view has its own tab. By default, Rell IDE has following views:

  • Project Explorer - shows projects and their directory trees.
  • Problems - shows compilation warnings and errors.
  • Console - console output (when running programs).
  • Outline - shows the structure of a selected Rell file.

Running Applications

Right-click on a file (or an editor) and choose Run As. Run options available for the file will be shown.


Alternatively, use keyboard shortcut CTRL-F11 (⇧⌘F11).


Rell Console App

Executes a *.rell file as a stand-alone console program, not as a module in a Postchain node.

The program must contain a function (or operation, or query) called main, which will be the entry point. The output is displayed in the Console view.

The name of the main function and its arguments can be specified in a run configuration.

Database connection

By default, the program is executed without a database connection, and an attempt to perform a database operation will result in a run-time error.

To run a console app with a database connection, there must be a file called, or in the directory of the Rell file or in the rell/config directory of the project. The file shall contain database connection settings. For example:


When running a console app with a database connection, tables for defined classes and objects are created on start-up. If a table already exists, missing columns are added, if necessary.

How to prepare a database is described in the Database Setup section.

Rell Postchain App

Starts a Postchain node with a configuration written in the Run.XML format. To use this option, right-click on a *.xml file, not on a *.rell file.

Using run.xml gives you the option to run multiple blockchains in one Postchain node.

Example of a minimal run.xml:





        <chain name="user" iid="1">
                <app module="main" />

Clear Database

This option is available for database properties files, *.properties (for instance, Drops all tables (and stored procedures) in the database.


Run with a Keyboard

By default, CTRL-F11 (⇧⌘F11) shortcut runs the file of the active editor. It can be configured to run the last launched application instead, which may be more convenient, as there is no need to choose an application type. Go to the menu Window - Preferences (macOS: Eclipse - Preferences), then Run/Debug - Launching. In the Launch Operation box, choose Always launch the previously launched application.


Running Multiple Apps

It is possible to run multiple applications (e. g. multiple nodes) simultaneously. For example, one can define two Run.XML configuration files that use the same Rell module, but different ports and database schemas.

The output of all running applications will be shown in the Console view, but on different pages. It is possible to switch between the consoles of different applications using a button or a dropdown list.


Run Configurations

To run an application, Eclipse IDE needs a run configuration, which contains different properties, like the name of the main function, arguments or blockchain RID. When running an application via the Run As context menu, the IDE automatically creates a run configuration with default settings if it does not exist.

To change a run configuration, go to the menu Run - Run Configurations…. The last launched application will be selected. Change the settings and click either Apply or Run to save the changes.