Jini Packages

The following is a typical Jini package-related error:

Exception in thread "main" java.lang.NoClassDefFoundError: 
             net/jini/discovery/DiscoveryListener

The Jini class files are all in .jar files. The Jini distribution has them in a subdirectory, lib. The files were repackaged in Jini 2.0: formerly you would use jini-core.jar, jini-ext.jar and sometimes sun-util.jar. Now you should use jsk-platform.jar and jsk-lib.jar.

A compile or run of a Jini application will typically have an environment set something like this:

JINI_HOME=wherever_Jini_home_is
CLASSPATH=.:$JINI_HOME/lib/jsk-platform.jar:$JINI_HOME/lib/jsk-lib.jar