Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Then, click on File -> New -> Project... as depicts on the Figure 1.

Image Added
Figure{} 1: Creation of a new project

This action will launch the project creation wizard. Select Java project (Figure 2), and click on "Next".

Image Added
Figure{} 2: Selection of the project type

Enter the project name (Felix for example). Select the "create separate source and output folders" option (if not already selected). These actions are depicted on the Figure 3. Then click on "Next".

Image Added
Figure{} 3: Configuration of the Felix project

On this new wizard page, you need only to change the default output folder (Felix/bin) to another (classes for example, as presented on Figure 4).

Image Added
Figure{} 4: Change the "Default output folder"

After that, click on the "Finish" button. You need to see the following structure (Figure 5). Check that the bin folder appears.

Image Added
Figure 5: Our new Java Project

...

Now, remember where you uncompress the Felix release. Move these files inside the created project. Override the bin folder when asked.

Image Added
Figure{} 6: Overwrite the "bin" folder

Once copied, refresh the project. You should see something as presented on the Figure 7.

Image Added
Figure{} 7: The Felix project after the copy

...

The Felix classes are inside bin/Felix.jar. So, we need to add this jar in the project build path as presented on Figure 8. Right-click on the felix.jar file and then choose Build Path -> Add to Build Path.

Image Added
Figure{} 8: Add the felix.jar file to the project build path

...

Now, the Felix project is ready. But, we need to configure a Runconfiguration to launch Felix. To achieve this, right-click on the Felix project and select Run As -> Run... (Figure 9)

Image Added
Figure{} 9: Create a Run configuration to launch Felix

This action launch the Run configuration windows. Create a new Java Application (Right-click on Java Application and select new) (Figure 10)

Image Added
Figure 10: Create a new Java Application

On the configuration wizard, enter a configuration name. Afterward, check the project name (it should be Felix if you choose Felix as project name). Then, Tick the "Include libraries when searching for a main class" option. You should obtain something as presented on the Figure 11.

Image Added
Figure{} 11: Felix run configuration

Next, click on the "Search" button. Enter "Main" in the text area. In the resulting list, select "Main – org.apache.felix.main". Below the list, you should see: "org.apache.felix.main /Felix/bin/felix.jar". The resulting windows must be similar as the Figure 11.

Image Added
Figure{} 12: Choose to "good" main class

At that moment, clicks on the "Ok" button. You come back to the Run configuration windows. Apply the configuration ("Apply" button). And click on the "Run" button (Figure 13).

Image Added
Figure{} 13: The Felix run configuration can be launched

...

Once launched, you should see in the Eclipse console view:

Image Added
Figure{} 14: Endly Felix inside Eclipse!

...

To stop Felix, either type shutdown in the console, either clicks on the red square ("terminate") in the console toolbar.

Image Added
Figure{} 15: Use the Felix console normally

...

Note: You can launch Felix in profiling mode too, if you have installed TPTP.

Image Added
Figure{} 16: Launching directly Felix from the icon bar

Image Added
Figure{} 17: Launch Felix in debug mode

...

Note: refresh your project; else the folder does not appear.

Image Added
Figure{} 18: Customize the Felix cache location

Image Added
Figure{} 19: The Felix cache inside your project

...

To achieve this, open the configuration file and add your needed bundle path to the felix.auto.start.1 property (Figure 20). Be careful to the / in your path, to the \ at the end of the line, and to leave a space to the beginning of a new line.

Image Added
Figure{} 20: Add auto-started bundles

...