Prev Next

Prerequisites

Before you start any of the tutorials you must prepare your environment so that the right tools are installed. This page helps you to achieve this. We need to run the following tools on your computer:

  • Java 17+, probably already got it? If not, this is a good time to get started!
  • Eclipse, if you do not know which variant, pick the Eclipse Standard variant
  • Git, unfortunately the built-in EGit in Eclipse needs some good old command line help

Installing bndtools

You can install bndtools from the Eclipse market place or from the update site.

You can find the details how to install bndtools on the bndtools website

Do not install the development version since it is currently incompatible with the tutorials.

Conventions

Whenever you see a text like File/Open we hope you treat it as a menu path. That is, go to the menu bar, click on File, then select Open. If the menu path starts with @/ then it is from the context menu on the selected object, which has then been clearly defined in the previous sentence.

OS Specific Issues

Since this part is rather sensitive to the operating system you’re using, we have split it in different sections for each of the major operating systems.

Windows

In the enRoute tutorials file paths are always indicated using the forward slash or solidus (‘/’) as is customary on *nix like systems. The reason is that bnd, since its files are portable, always uses relative addressing from the workspace and adopted the forward slash. For most developers mapping these paths to Windows should be straightforward.

The only addressing outside the workspace is to the user’s home directory, the user’s home directory is indicated by a path that starts with a tilde and a slash (‘~/’). This maps to the path indicated in Java’s user.home System property.

Make sure you have a good command line shell available. If you’re familiar with one, keep it. If command lines are uncomfortable for you, you might want to use Git for Windows which includes a bash like shell. Though virtually all work in OSGi enRoute is done through Eclipse, there are some crucial elements where the shell is just much nicer.

MacOS

If you start using enRoute you will likely create a number of workspaces. There is a multi-workspace launcher plugin from Torkild U. Resheim.

OS X Eclipse Launcher Utility

Level

In this tutorial we assume that you’ve followed the quick start tutorial and are familiar with Eclipse. We will therefore not show the steps to create a project or a bndrun file in detail. That is, if you don’t know whay resolving is then you will not be able to make this tutorial. So if you have not done the quickstart tutorial yet then it is highly recommended to this first.

Setting Up bndtools

The next setup is the Eclipse works. Please follow the quick start tutorial or if you’re ambitious the base tutorial. For this tutorial, you should create a new workspace as described in the tutorials. Make sure you get the latest version workspace from github.

The git commands to create a new workspace are:

cd  ~/git
git init com.mycompany.chat
cd com.mycompany.chat
git fetch --depth=1 https://github.com/osgi/workspace master
git checkout FETCH_HEAD -- .

As advised in the quick start tutorial, you should open an Eclipse workspace in another directory, for example, ~/eclipse/com.mycompany.chat and the import the cnf project from your git workspace ( ~/git/com.mycompany.chat in the command line example).

In the tutorial we will use osgi.enroute.examples.chat as the workspace name. It is recommended to choose a name that is more logical for yourself.


Prev Next