IntelliJ IDEA 2020.1 Help

OSGi

IntelliJ IDEA lets you create OSGi-based applications using OSGi plugin. IntelliJ IDEA also lets you import Bnd/Bndtools projects. You can create a project with the OSGi support, add a module with the OSGI support to the existing project, or add the OSGi support to an existing module.

Create a new project

  1. Launch IntelliJ IDEA.

    If the Welcome screen opens, click Create New Project.

    Otherwise, from the main menu, select File | New | Project.

  2. In the New Project wizard, select Java from the list on the left.

  3. From the Project SDK list, select the JDK that you want to use in your project.

    If the JDK is installed on your computer, but not defined in the IDE, select Add JDK and specify the path to the JDK home directory.

    If you don't have the necessary JDK on your computer, select Download JDK.

  4. From the Additional Libraries and Frameworks list, select OSGi.

  5. In the Libraries section, select Download if you don't have the necessary library on your computer.

    Otherwise, select Use library, then click Create, and select the necessary files in the dialog that opens.

    Click Next.

    Creating a new project
  6. Name the project and change the default project location if necessary. Click Finish

Add OSGi support to the existing module

  1. In the Project tool window, right-click the module to which you want to add the OSGi support and select Add Framework Support.

  2. In the dialog that opens, from the left-hand pane, select OSGi.

  3. In the Libraries section, select Download if you don't have the necessary library on your computer.

    Otherwise, select Use library, then click Create, and select the necessary files in the dialog that opens.

    Click OK.

    Adding OSGi support to the existing module

Open an existing OSGI project

  1. On the welcome screen, click Open or Import.

    If your project has a custom configuration, press Ctrl+Shift+A and type project from existing sources. Alternatively, from the main menu, select File | New | Project from Existing Sources.

  2. In the dialog that opens, select a directory containing your project and click Open.

  3. If you selected the Project from Existng Sources option, IntelliJ IDEA displays an additional dialog where you can select a model from which you can import your OSGI project.
    New Project: External model
    When you are done, click Finish.

    For more information on how to open or import a project, refer to the Import a project section.

Last modified: 25 May 2020