concept jdb in category osgi

appears as: jdb
OSGi in Action: Creating Modular Applications in Java

This is an excerpt from Manning's book OSGi in Action: Creating Modular Applications in Java.

The Java Debugger (also known as jdb) is a simple debugging tool that primarily exists as an example application for the Java Platform Debugger Architecture (JPDA, http://java.sun.com/javase/technologies/core/toolsapis/jpda/index.jsp) rather than a product in its own right. This means it lacks some of the polish and user-friendly features found in most other debuggers. But jdb is still a useful tool, especially when you’re debugging on production servers that have limited installation environments.

$ cd chapter08/debugging-bundles

$ ant dist

$ jdb -classpath launcher.jar launcher.Main bundles

Initializing jdb ...
>

You should see the updated paint window appear, as shown in figure 8.1. All you had to do is use the jdb command instead of java and specify the class path and main class (the jdb command doesn’t support the -jar option). You didn’t have to tell jdb anything about your bundles or the OSGi framework; from jdb’s perspective, this is just another Java application.

Figure 8.1. Updated paint example running under jdb