Jolie Binaries Installer
Jolie requires Java to run.
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.10.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.10.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.
/usr/local/lib/jolieas the directory of installation of Jolie and
/usr/local/binas 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
System Package Managers
You can install Jolie also through system package managers.
Homebrew (macOS, Linux, Windows 10 WSL)
To install Jolie using Homebrew just type brew install jolie in your terminal.
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:
Clone the repository
git clone https://github.com/jolie/jolie.git
This prepares a Jolie installation inside of directory
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
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
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
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.
/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.
Jolie is supported also by the following editors, although the maintainers of the respective plugins are not maintaining them anymore.
Jolie support for the Atom editor can be installed with the official Atom Package Manager (apm):
apm install atom-jolie
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
You can discover your
$KDE_HOME directory by issuing the kde4 config localprefix command.
Both plug-ins can be installed directly within Sublime Text with Package Control.