Jolie Binaries Installer
Jolie requires Java to run.
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.3.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.3.jar.
/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
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:
Open a shell and execute:
git clone https://github.com/jolie/jolie.git
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
The Jolie launchers are installed inside folder
/usr/bin, but also this parameter is configurable in
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.
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
buildconfig/config.properties file and change the parameters
install.dir by replacing the existing directories with your desired ones. Use
\\ instead of the single backslashes when writing paths. Here is an example:
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
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
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.
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.