Jolie Binaries Installer

Jolie requires Java to run.

Make sure to have Java 11 or later installed before proceeding. (If you have to use a previous version of Java, Jolie version 1.10.0 and previous require only Java 8, and Jolie version 1.5.0 and previous require only Java 6. See our previous releases.)

Get the Jolie installer

Download the Java-based installer of the latest release of Jolie:

Here you can find the previous releases of Jolie.

Run the Jolie installer

Open a shell terminal, access the directory in which you downloaded the installer, and execute java -jar jolie-1.12.1.jar. The installer may need permissions to write in the directories in which you intend to install Jolie. Depending on your Operating System you can launch the Jolie installer with elevated privileges:

  • on Windows, by start a command prompt with administrator privileges and launch the installer;
  • on Linux/MacOS, by launching the installer as root with command sudo java -jar jolie-1.12.1.jar.

Please, check that the two environment variables below are correctly set to run Jolie:

  • PATH: must include the installation path of the Jolie launchers;
  • JOLIE_HOME: must point to the installation folder of the Jolie binaries;

To know how to set your system variables, you can refer to the Java install guideline.

Installation Troubleshooting
In MacOs X El Capitan (10.10.11) it is not possible to install Jolie using the default values provided by the installer. When prompted by the installer, insert e.g., /usr/local/lib/jolie as the directory of installation of Jolie and /usr/local/bin as the directory of the launchers.
The launchers deployed by the installer use the environment variable JOLIE_HOME to set the classpath and launch Jolie. As reported by the installer at the end of the installation, it is possible to set JOLIE_HOME with the command echo ‘export JOLIE_HOME=“/usr/lib/jolie”’ >> ~/.bash_profile
However, some versions of Linux/MacOs X do not source the .bash_profile file. If, when trying to run Jolie you get the message “Error: Could not find or load main class jolie.Jolie”, it could be the case your shell is not sourcing file .bash_profile. To fix it, edit your .bashrc in you home directory by appending at its end the line source .bash_profile.

System Package Managers

You can install Jolie also through system package managers.

Homebrew (macOS, Linux, Windows 10 WSL)

Homebrew is a commonly used package manager on macOS and it is also available for Linux and Windows 10 WSL systems.

To install Jolie using Homebrew just type brew install jolie in your terminal.

In case you do not have Homebrew installed in your system, please follow the instructions for MacOS and Linux/Windows 10 WSL.

Compilation from Source files

Following these instructions you can download the development version of Jolie from the official repository. It requires the following software to be installed before proceeding:

Linux and Mac OS

Clone the repository

git clone https://github.com/jolie/jolie.git

cd jolie

mvn install

This prepares a Jolie installation inside of directory dist.

Set up Jolie for the local user

Now one can use the script scripts/dev-setup.sh ~/bin to set up a working installation of Jolie for the local user (assuming ~/bin is in the $PATH variable). This will create launch scripts in ~/bin and put all Jolie libraries in ~/bin/jolie-dist.

Windows

Compiling Jolie under Windows requires to work only within the same drive e.g.. C:. This is due to limitations of the Java class-loader in locating resources within different drives.

Open a command line and execute

git clone https://github.com/jolie/jolie.git

cd jolie

mvn install

Quick start with pre-built image

This solution requires Docker installed in your machine.

Open a shell and pull the most recent Jolie image with the command docker pull jolielang/jolie.

Once the image is available on your machine, create a container from it by adding a local volume where storing the Jolie files: docker run -it -v /your-host-folder-path:/your-container-path –name CONTAINERNAME jolielang/jolie.

Now you can edit your files in folder /your-host-folder-path and find them in your container folder /your-container-path.

Finally, to run a Jolie microservice type jolie your_file.ol in the launched shell.

Containers are also useful to test systems of microservices running within the same container. To run a new microservice on the same container type docker exec -it CONTAINERNAME bash to launch a new shell, following the previous commands to execute the desired service.

Running examples in Jolie documentation with Docker

The Jolie documentation contains many running examples. With the Jolie Docker image you can run any of these examples without having Jolie directly installed in you OS.

The easiest way to run them is to directly pull the docker image jolielang/jolie-examples with command docker pull jolielang/jolie-examples.

The folder /examples of the container includes all the complete examples reported in the documentation (see the related repository).

Integrated Development Environments

The listed editors have one or more plug-ins to aid Jolie programmers with syntax highlighting, on-the-fly error notification, and direct in-editor service launch shortcuts.

Visual Studio Code

The most mature editor support for Jolie is currently offered by the Jolie extension for Visual Studio Code, called vscode-jolie. You can install it directly from within Visual Studio Code or by visiting https://marketplace.visualstudio.com/items?itemName=jolie.vscode-jolie.

Contributions to the extension are very welcome. See https://github.com/jolie/vscode-jolie for its code repository.

Unmaintained Editors

Jolie is supported also by the following editors, although the maintainers of the respective plugins are not maintaining them anymore.

Atom

Jolie support for the Atom editor can be installed with the official Atom Package Manager (apm):

apm install atom-jolie

Contributions to the language-jolie and linter-jolie packages are welcome.

Kate

Jolie support for the Kate editor comes as a file for KatePart (used by most KDE applications and the Kate editor itself). To install it in Kate, download the latest version of the file and store it within folder $KDE_HOME/share/apps/katepart/syntax directory.

You can discover your $KDE_HOME directory by issuing the kde4 config localprefix command.

Sublime Text

Jolie support for Sublime Text 2 and 3 comprises the Jolie plug-in for syntax highlighting and service launch and SublimeLinter-jolint for on-the-fly error reporting.

Both plug-ins can be installed directly within Sublime Text with Package Control.