OSGi Development with IntelliJ IDEA

Table of Contents

  1. Create Project
  2. Running debug with IntelliJ IDEA
  3. Test

Create Project

  1. Select Create New Project (File > New > Project).
  2. Select Empty Project and click Next.
  3. Name the project, select the location to store it in, and then click Finish.
  4. Add all required modules to the newly created project. Open the Module settings and then, in the left column, select Libraries.
  5. On the right, click the + icon, and select the Java option.
  6. Go to the folder of the installation and select the required library ({install_dir}/lib/api/8.3.0). Click Open.
  7. Repeat for all required libraries.
  8. When done, click OK. After indexing, the projects should be compiled.

Back to top

Running debug with IntelliJ IDEA

  1. From the Run option, select Edit Configurations.
  2. Select the + option and select Remote.

  3. Name the Run configuration and select the debug port that the server will be running on, as shown below.

Back to top

Test

Click in the border of the code to add a breakpoint.

Back to top