The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

BobFutrelle (9) [Avatar] Offline
Since it wasn't obvious to me how to do this, maybe others would like my example as to how to proceed.

I created a project (not a java project) in Eclipse with the name 'osgi-in-action', corresponding to the top-level folder in the book's sample code. I then copied all the files from the book's osgi-in-action folder, except for chapter02 through chapter15, into my project folder. Using Ant, I ran the build.xml file in the modularity folder. It produced a main.jar file.

In the CLI I executed java -jar main.jar, which produced the expected result,
"Hello, modularity!" (Success!)

I had already produced an OK main.jar file using Ant on the CLI, separate from Eclipse. But Eclipse is handy for editing source files and build files, running Ant, etc.

I assume that the strategy above should work for the sample code in all fifteen chapters.

There are so many code examples from the authors (Thanks!) that I should end up knowing how to build my own OSGi-based code.

- Bob