Jolie Binaries Installer

Jolie requires Java to run.

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

Get the Jolie installer

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

Here you can find the previous stable 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.6.4.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.6.4.jar.
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.

Compilation from Source files

Following these instructions you can download the development version of Jolie (trunk). It requires the following software to be installed before proceeding:

Linux and Mac OS

Open a shell and execute:

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

cd jolie

ant && sudo ant install

The ant script will automatically build and install Jolie for you. The default installation path for the Jolie binaries is /usr/lib/jolie, but the installation parameters can be controlled by editing buildconfig/config.properties.

The Jolie launchers are installed inside folder /usr/bin, but also this parameter is configurable in buildconfig/config.properties.

Remember to follow the on-screen instructions at the end of the installation procedure about the environment variables. This final step is similar to setting the java_home variable for Java, as explained here.

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

Open the buildconfig/config.properties file and change the parameters install.launcher_dir and install.dir by replacing the existing directories with your desired ones. Use \\ instead of the single backslashes when writing paths. Here is an example:

install.launcher_dir=C:\\Windows\\system32
install.dir=C:\\Jolie

In case you change the directory for install.launcher_dir, make sure that it is included in your your PATH environment variable (similarly to what explained here for Java). Please note that using paths with spaces may cause problems in Windows and need special handling.

Finally, execute ant dist-install, following the on-screen instructions at the end of the installation procedure regarding environment variables. In particular, you should make sure that the environment variable JOLIE_HOME is set to the directory you used for install.dir.

Quick start with pre-built image

This solution requires Docker previously installed in your machine.

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

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/jolie1.6.0beta1.

Now you can edit your files in folder /your-host-folder-path and find them in your container folder /your-host-folder-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.

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.